johnridley: (Default)
[personal profile] johnridley
It's been a while since I whipped up a new non-trivial (not just HTML, in other words) web page, so I'd forgotten.

I got this great idea that I'd throw together a web page for the church's site with a downloadable and streaming copy of the audio from the week's service and JPGs of the program (including announcements, etc).

So, I needed an embeddable MP3 player, and I figured it'd be nice to be able to flip pages on the program without reloading the page (and resetting the MP3 player) so a little trivial Javascript takes care of that.

About 30 minutes had everything working fine in Firefox under Linux. Tested, works fine in Firefox under Windows as well. Test with IE...nothing worked. It took another 2.5 hours to find and stomp out all the various things that IE doesn't do the same as everyone else. One line of code changes to 10 to support IE. Yeesh.

Amazingly, a version of this page that supports EVERYTHING BUT IE contains less code than a version that supports NOTHING BUT IE. IE has, over the years and versions, done things so many various and stupid ways that the javascript to figure out what version of IE you're running and to make allowances is more code than that to do the stuff in question with non-IE browsers (which are pretty much uniform - mainly Opera has to be allowed for separately sometimes, and once in a while, Safari). Even with IE8 in "compatibility" mode the stuff doesn't work.

I hear IE is down to under 65% market share. Unfortunately, it'll never hit zero, no matter how much every web developer in the world with any sense might wish it.

Date: 2009-12-07 12:16 am (UTC)
From: [identity profile] nicegeek.livejournal.com
You don't want IE8 in compatibility mode; that makes it work mostly like IE7 (i.e. less compliant with the W3C standards).

Supposedly, IE8 is supposed to be okay as long as you stick to HTML 4.01 and CSS 2.1. It's when you get into JavaScript, or trying to support IE7 (and worse, IE6) that causes the pain there.

I retain some hope for the future once the older versions of IE have dropped to non-significant levels.

Date: 2009-12-07 12:52 am (UTC)
From: [identity profile] johnridley.livejournal.com
Yes, this was all javascript issues.

CSS can be a pain to get IE and everything else to work, but JS brings in the real discomfort.

The two problems that I had were that I was embedding a Flash MP3 player, and IE does embedding differently than all other browsers, and also that I was trying to scale an image to be smaller than whatever the user's browser width was to avoid horizontal scrolling, and JS under IE gets window width differently than everyone else.

Date: 2009-12-20 01:38 pm (UTC)
From: [identity profile] backrubbear.livejournal.com
FWIW, one way around this sort of headache is to avoid doing stock javascript as much as possible. Use something like jQuery. They've solved your headaches already.

Date: 2009-12-20 01:58 pm (UTC)
From: [identity profile] johnridley.livejournal.com
If I were doing this kind of thing regularly, I'd find a toolkit. For throwing a few dozen lines of simple stuff into a web page twice a year, I'll deal with it. It'd take me far longer to learn a new toolkit than to just solve the problem, and I'd forget the toolkit again before I needed to use it again.

It really isn't that big of a deal, I just find it irritating that Microsoft can't even make a browser compatible from one version to the next, while everyone else works the same way between companies, browsers and versions.

February 2026

S M T W T F S
123456 7
891011 121314
15161718192021
22232425262728

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 14th, 2026 11:43 pm
Powered by Dreamwidth Studios