Hacker News new | ask | show | jobs
by arohner 6193 days ago
I'm new to web development, and I keep asking this question but I've never heard and answer to it:

What's stopping us from making a tool that parses HTML/CSS and points out constructs that are known to be bad in certain browsers? Sort of like lint: "It looks like you're sending element foo inside element bar to IE6. This probably won't work right"

I personally don't have a windows box to test IE, and I'm not looking forward to the day when I'll have to test on IE. Surely there is a better solution than manually testing browsers?

5 comments

I suspect this kind of thing is a lot harder than it sounds.

There are a few things you could catch, like CSS features that just don't exist in IE6, but trying to predict if your particular mix of content+HTML+CSS is going to "look wrong" when viewed in IE is not a trivial problem.

You could probably match some patterns, but things can get really complicated when you introduce javascript into the mix. All of a sudden your tool needs to test every button on a page to make sure your ajaxed data tables won't blow up your layout.

Also, web development tends to push the envelope often. I've built literally hundreds of web sites / apps and I still come across nasty unexplicable post-ajax redraw bugs in IE6 that I've never seen before (using markup that I used to consider "safe", but which turns out to break under a new novel condition).

I realise you're hoping for a better solution than manual testing and I can assure you, so is everyone else. However, if you do not have a real or virtual Windows box to test on, you might find these links of interest:

http://www.browsrcamp.com/

http://www.browsercam.com/

It would be cool to have HTTP proxy software that did this. So you set it as 'ie6' and it looks at your CSS and HTML and translates it into the "ie6 view" with problems annotated.
have you heard of ie7-js? it uses javascript to fix many such problems.

http://code.google.com/p/ie7-js/