Web Devout tidings


Archive for May, 2007

Preparing your site for IE.next

Tuesday, May 29th, 2007

Internet Explorer 7.0 came out October 2006, and web developers around the world panicked. Many sites had relied on CSS hacks to make Internet Explorer 6 fall into line, but with Internet Explorer 7’s not-quite-exhaustive fixes for some of the bugs which made the hacks possible and some of the bugs the hacks were used to fix, many of those sites ended up breaking in the new version. Web developers had to scramble to get the sites patched up, and it was a frustrating experience for many.

Fortunately, the Internet Explorer development team at Microsoft has learned from this experience. Starting with the next version, currently codenamed IE.next, it should be up to the web developers to opt into the new improved standards support which is responsible for breaking previous hacks. For websites which haven’t opted in, IE.next will (for the most part, at least) try to display the site just like IE 7 did. Microsoft hasn’t yet finalized the details on exactly how web developers would opt in (probably through some kind of special HTML comment), but that isn’t what this article is about. This article is about preparing your current site to minimize the chances of breaking when the next version of Internet Explorer is released.

There is really only one big issue to cover. By default, IE.next should treat your webpage exactly as IE 7 does now: current CSS bugs will still exist, current CSS hacks will still work, etc. The only difference might be Internet Explorer’s version number. But that’s exactly where trouble might occur. If you use version-specific conditional comments like many people do, then pay attention.

Let’s say your site currently requires some CSS hacks for IE 7, and you include a special stylesheet using a conditional comment with the [if IE 7] condition. IE.next (which might end up being IE 8) wouldn’t get the IE 7 stylesheet, would it? The IE development team might end up deciding to make some special exceptions for this, but for the moment we’ll have to assume that this could cause some problems. Since IE.next would have the same bugs as IE 7, it would require the same CSS hacks IE 7 does. But if you use the [if IE 7] or [if lte IE 7] condition, IE.next wouldn’t receive those hacks and would make casserole out of your site.

The solution is easy: For any conditional comment that specifically selects IE 7, you should also include all future versions. Here are the changes you’ll need to make:

  • [if IE 7][if gte IE 7]
  • [if lte IE 7][if IE]
  • [if lt IE 8][if IE]
  • [if gt IE 7] → Unless you’re already aware of the IE.next changes and are opting in for the new standards support, you should never use this condition. Just get rid of the conditional comment and its contents.

Keep in mind that if you deliberately opt in for the new standards support, then you may very well want to separate IE 7 from future versions. The above conversions are just for sites that are already made or will be made before we can reasonably consider opting in.

There’s a possibility that future versions of IE will pretend to be IE 7 for the conditional comments when you haven’t opted in, but the above conversions are still safe to make in that case.

If you do this, and if Microsoft implements the opt-in system into IE.next as they have described, then your site has a very good chance of working in future versions of Internet Explorer without requiring any additional changes. There are, however, no guarantees, and it’s still important to check the site in the new version of IE once it’s released, which will probably be in late 2008 or early 2009.

Update on the job opportunities

Tuesday, May 22nd, 2007

As mentioned earlier, I was approached by both Microsoft and Mozilla with the possibility of a job with one of them. I’d like to give an update on the situation.

First of all, I really appreciate how Microsoft (specifically, Markus Mielke) hung out with me, sat in my IRC channel and chatted with me, and generally made me feel welcome throughout the last few weeks. Their sales pitch was also about the best pitch they could have made: if I really want Internet Explorer to improve, why not roll up my sleeves and play an active role in its development myself? I felt then and still feel today that I’d love to do what I can to help move Internet Explorer in the right direction.

However, as the discussion progressed, a few things started worrying me.

In order to work for Microsoft, I’d have to agree to not post or maintain any content particularly critical of Microsoft’s products. I already figured that the Internet Explorer is Dangerous page would have to be dumped or given an overhaul (and I actually do plan to eventually do a major rewrite of the page with better focus on what the core problems are rather than just “it’s fundamentally flawed”). But I’m no legal expert, and the loose wording they used put up a red flag in my mind, especially considering Microsoft’s extensive history of dishonesty and shady “gotcha” fine print in their agreements. There isn’t much I value more than freedom of speech, and if I receive a slightest hint that I may be unable to publicly express my true concerns on an issue, I have to take a step back and reevaluate the situation. I can’t risk Web Devout being sacrificed for a position that, in terms of how much influence I’ll actually end up having, is a bit of a gamble from where I stand.

Where I currently work, the only restrictions on my freedom of speech are for things like account passwords. The hours are flexible and the work is flexible. If I feel like making a blog for our organization, I make it, show it to my boss, and he says, “Cool, you should send links to everyone.” I love my job because I feel free. I only make $25,000 a year right now, but I’m fine with that. For now, all I need are a computer, Internet connection, food, bill repellent, and some money in reserve for emergencies. That’s enough.

I was never considering the Microsoft job for the money and benefits. Those are nice and all, but it wasn’t really a factor in my decision. From the beginning, my decision was going to be based on how much freedom I was willing to give up and how much that sacrifice would help me accomplish my goals. I want the Web to be a better place. I want web developers to have the right tools to make the most out of it. I definitely want Internet Explorer to be a better browser, but that’s just one piece in the big puzzle, and if working on that one piece would prevent me from working with the many other pieces I want to work with, then that’s a problem. How much of a difference would I really be able to make on the IE team? How much of a difference would I be able to make elsewhere if I had more freedom? I’ve been juggling these questions in my mind for the last few weeks.

I noticed something else. Somehow, I was under the impression that Microsoft had been improving over the last few years in regard to their role in the industry. Maybe it was just because they stopped being quite as aggressive for a few years and sort of sat on their laurels, I don’t know, but somehow I thought Microsoft was learning and improving, more openly embracing freedom of choice and standards, or at least not trying to fight it as much anymore. But the last few weeks have shot that idea dead in the water. Microsoft began sending out mass e-mails telling people to vote against the California state bill promoting ODF, instead telling them to push for Microsoft’s OOXML, using shameless flat-out lies like OOXML being better supported than ODF and being more application-agnostic (which anyone remotely familiar with the formats knows is B.S.). Microsoft began making up baseless nonsense about open source patent infringements for which they refused to provide any evidence. I’m hearing one story after another lately, and it’s really irritating. Microsoft gave me another reason to be concerned about taking a job with them: overall, Microsoft has continued to fight against the best interests of the computer industry, and they seem to be sparring against every application and technology that I personally like.

Then I thought about my future after Microsoft. I don’t want to work with Microsoft forever. I know that I’d have trouble adjusting to their culture, I don’t have any particular enthusiasm for their products (for the Web, sure, but not Microsoft’s products), and it’s generally not a company that I could feel proud or excited to work for. But once I decide to leave, then what? There aren’t many interesting companies in the area, and I wouldn’t have as good of a chance making positive connections with interesting companies as I might working for Mozilla. Big companies, maybe, but not as much interesting ones. Then, I have to consider any legal agreements Microsoft would require me to sign which would restrict what I can do after I leave the company. I recall a guy who left Microsoft for Google to manage the China operations, who was then forced to change jobs because of a previous contract he made with Microsoft. Like I said, I don’t have much of a mind for legal fine print, and I’m a bit paranoid about possibly putting myself into one of these types of situations. It’d be different if this were with a company that I really wanted to work for long-term, but Microsoft isn’t that company.

The bottom line is that I enjoy what I’m currently doing, I feel like I’m being productive toward a goal, and I have several doubts about what would become of my ability to achieve my goals if I were to work for Microsoft. I would love to chat with the IE developers and discuss what future directions would be in the Web’s best interest, but I’d much rather do that without the major legal bindings to Microsoft itself. I have no personal beefs with anyone at Microsoft; it’s just the overall company policies and history which worry me. In the end, I just wasn’t comfortable enough with the idea of working for them, so I declined.

Shifting back to Mozilla, I honestly don’t know what the status is, but I have a feeling it’s currently in limbo. I had a phone chat with someone who was considering me to do documentation work, but we agreed that some sort of development position would be better suited to my skills. He said someone from that end of the company was supposed to get in touch with me a week later, but I haven’t heard from them since. I really hope the message didn’t get lost in the spam filter; I just discovered that every single blog comment moderation notification was getting marked as spam without my knowledge, so I just approved a bazillion comments earlier today.

For now, I’m having fun at my current job, and I have some nice tools in the works for Web Devout. I’m also planning to, in the near future, get a lot of my source code cleaned up and open sourced under GPL licenses. I’ve already released the generic syntax highlighter script used on the webpage test system, and other tools like the log-scanning visitor statistics system, site crawler and search engine, and eventually the PHP-based SGML/XML parser will come later.

Self-contradictions in the HTML WG

Tuesday, May 22nd, 2007

HTML 5 will include the embed element, font element, and other elements which could easily be replaced using better and well-supported features. Ian Hickson wants them included anyway.

HTML 5 will not include the headers attribute for tables, which was designed to aid accessibility. Ian’s reason for not including them? They can easily be replaced with another feature (the scope attribute).

Ian wants all of the bad practice features of HTML included in HTML 5 because they are widely used.

Ian doesn’t want the good practice headers attribute included even though it’s widely used.

Can someone please tell me what’s going on?

Update 2007-06-01: Here’s a relevant article from Juicy Studio: The HTML Scope/Headers Debate.

Stop referring to the W3Schools browser usage stats

Friday, May 18th, 2007

It seems like more and more people lately have been linking to the W3Schools browser statistics page mistakenly thinking that those statistics are supposed to represent the Web as a whole.

Stop it.

The W3Schools browser statistics page only gathers data from the W3Schools server logs, which means it only counts W3Schools users. Most people who go to W3Schools are web developers (usually of the amateur-to-moderate range). Web developers are well-known to have dramatically lower Internet Explorer usage than average people. Just take a look at Web Devout’s visitor statistics, which currently show Firefox ahead of Internet Explorer by 15 percentage points.

This is not average. Firefox doesn’t have around 50% market share. It doesn’t have around 33% market share. It doesn’t even have 20% market share yet, by most accounts.

Most major web analytics companies agree that Firefox usage right now is right around 15%, Internet Explorer usage is around 80%, Safari usage is around 5%, Opera is below 1%, and everything else is smaller. Trend-wise, Firefox usage is generally reported to be increasing at a quickening pace, Internet Explorer usage is shrinking at a quickening pace, Safari usage seems to stay proportional to overall Mac usage (likely due in large to the fact that it’s the default browser on the Mac, the same reason Internet Explorer is so widely used on Windows), and Opera usage isn’t changing much. The Wikipedia article organizes the various groups’ data pretty well.

The W3Schools browser statistics page shows drastically different results than this, since the measured audience is so far from average. The page even says this below the figures:

W3Schools is a website for people with an interest for web technologies. These people are more interested in using alternative browsers than the average user. The average user tends to use Internet Explorer, since it comes preinstalled with Windows. Most do not seek out other browsers.

These facts indicate that the browser figures above are not 100% realistic. Other web sites have statistics showing that Internet Explorer is used by at least 80% of the users.

There also seems to be a strong misconception that W3Schools is somehow related to the W3C. It is not. W3Schools is a completely different group from the W3C with a completely different purpose and no significant affiliations. In fact, W3Schools has a large amount of information which directly conflicts with the standards. Their webpages follow lots of bad practices including table elements for design layout purposes and other presentational markup, serious misuse of XHTML, and the use of nonstandard elements like embed. W3Schools should not be considered an expert source on web standards.

Other web standards experts worried about HTML 5

Friday, May 11th, 2007

More web standards experts have begun expressing worries about the direction HTML 5 is currently going. Roger Johansson, writer for the excellent 456 Berea Street blog, has written a few posts on the subject. From one of the posts: “What is currently going on in the W3C HTML Working Group is very disappointing and something I never expected to see when I joined it. I was naive enough to think that everybody joining the HTML WG would be doing so out of a desire to improve the Web. Unfortunately, that does not seem to be the case”

Check out the posts and comments in the following links: