Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Making IE Standards Compliant

Posted by CowboyNeal on Fri Mar 12, 2004 06:11 AM
from the clever-css-tricks dept.
spin2cool writes "Dean Edwards has taken it upon himself to make Internet Explorer W3C compliant. How? Well, it isn't by patching the application, as you might suspect. He's created a stylesheet, dubbed 'IE7' that uses DHTML to load and parse style sheets into a form that IE can understand. Just include the style sheet in your HTML pages, and things should render correctly. The complexity of the CSS transformations is really amazing and shows off the power of this stuff."
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Kudos, but... (Score:5, Insightful)

    by Channard (693317) on Friday March 12 2004, @06:14AM (#8541731) Journal
    .. it's a sad state of affairs when a developer outside of Microsoft actually ends up doing something that MS should have done themselves. So they can say 'screw it' to standards and someone else does the finger-work.
    • Re:Kudos, but... (Score:5, Insightful)

      by MartinG (52587) on Friday March 12 2004, @06:36AM (#8541845) Homepage Journal
      Not really. It's perfectly natural to many of us for someone to change things to work in the way they want them to. It's a basic freedom that many of us try to protect.

      What's unusual in this case is that closed proprietry software has been "changed" without access to the source.

      It's not sad that someone other than Microsoft had to do it. It's sad that people other than Microsoft can't do such things a whole lot more.

      (in reality, they can of course by not using closed source software, but for some it seems percieved convenience is more important than freedom, but I digress)
      • Re:Kudos, but... (Score:5, Informative)

        by kalidasa (577403) * on Friday March 12 2004, @06:49AM (#8541914) Journal

        in reality, they can of course by not using closed source software, but for some it seems percieved convenience is more important than freedom, but I digress)

        What this does is allow developers of standards-based sites, which they have under their own control, to provide a stopgap for users who don't understand the issue of standards and so haven't themselves chosen freedom. So your digression doesn't quite match the facts. As a developer, I can choose to make my site work in Mozilla and KHTML - and will - but I can't choose to force my audience to use them. With this, if it works as advertised, I can choose to follow standards and still provide some means for those who have, for whatever reasons, chosen to use a non-free browser to use my content.

  • by maroberts (15852) on Friday March 12 2004, @06:17AM (#8541746) Homepage Journal
    Is ponder how to get over the Slashdotting of his site.

    I'm sure the CSS is a work of technical art; seeing it would be even better.
  • firefox (Score:5, Informative)

    by selderrr (523988) on Friday March 12 2004, @06:19AM (#8541757) Journal
    I wish someone would release such a sheet for firefox : /. itself still doen't render correctly on FFox 0.8 under XPpro. As shown here [kuleuven.ac.be], the left column tends to dribble into the article summary...
  • Google cache (Score:5, Informative)

    by Underholdning (758194) on Friday March 12 2004, @06:22AM (#8541775) Homepage Journal
    Site is already slashdottet. Here's Google's cache [66.102.11.104] of the document.
    So - how are the plans going with implementing a slashdot cache?
    • Re:Google cache (Score:5, Interesting)

      by nacturation (646836) <nacturation&gmail,com> on Friday March 12 2004, @06:58AM (#8541955) Journal
      I still don't know why Slashdot doesn't reference non-high bandwidth sites using the freecache service [archive.org]. All that needs to be done is prefix the URL with http://freecache.org/ and follow it with the full regular URL, eg:

      http://freecache.org/http://www.slowsite.com/big _p ictures.html

      It benefits the site owner by having reduced bandwidth costs and it also benefits Slashdot as we can read the articles.
  • Id say (Score:5, Funny)

    by 222 (551054) * <`moc.liamg' `ta' `rekeesmrots'> on Friday March 12 2004, @06:25AM (#8541794) Homepage
    Judging by the loading lag, and eventual time out hes managed to make his webserver IIS compliant also ;)
  • Nice (Score:5, Insightful)

    by foolip (588195) on Friday March 12 2004, @06:27AM (#8541802) Homepage
    The site is /.ed, but from what I can make out from the front page, this is making IE CSS standards compliant. Does it also work some magic to make it compliant with HTML (or even better, XHTML) standards (which would be far more useful), or is that just impossible?

    In any event, this may allow me to actually use some CSS 2, a standard that was published in May 1998 (almost 6 years ago!) and still isn't (fully) supported by the leading browser in the world...
  • by androse (59759) on Friday March 12 2004, @06:40AM (#8541861) Homepage

    The title of the news is misleading : this JS component only corrects some CSS 2 selectors that IE doesn't natively support.

    So it doesn't really make IS standards compliant, it just extends some functionnality. It doesn't, for example, correct the box model of IE5.

    So I'm afraid it doesn't spare us of using CSS hacks [centricle.com] to filter out IE.

  • Dean Edwards (Score:5, Interesting)

    by amigoro (761348) on Friday March 12 2004, @06:44AM (#8541889) Homepage Journal
    I thought this was something about the democratic nominations, but then saw Kerry [mithuro.com] was missing.

    Flippancy apart, I think using CSS to make IE7 W3C compliant is a really brilliant idea. However, the browser itself is a small part of the equations. Very few websites are W3C compliant. Vast majority of them are geared to a certain browser, depending on the whim and fancy of the designer.

    For my part, I run my sites thru Anybrowser [anybrowser.com] to make sure they will render on, well, as the name suggests, any browser.

  • by SlashMaster (62630) on Friday March 12 2004, @06:48AM (#8541908)
    Anyone who cares this much about the company's product should be given serious consideration for employment.

    Microsoft should hire him...
    • by 0x0d0a (568518) on Friday March 12 2004, @06:53AM (#8541930) Journal
      Microsoft has little benefit in ensuring that IE complies with standards -- as a matter of fact, now that they have over eighty percent marketshare, I would go so far as to say that it is to their benefit to have divergent behavior. Nobody cares about a bunch of web designers grumbling about a broken browser when the masses Just Want It To Look Right and blame the designer when it doesn't.

      Wouldn't life be grand if Microsoft shipped the open source Mozilla as their default browser?
    • by l0wland (463243) <l0wland&yahoo,com> on Friday March 12 2004, @07:16AM (#8542028) Journal
      "Microsoft should hire him..."

      There's a greater possibility that Microsoft will pay him to STFU.

  • Mirror made (Score:5, Informative)

    I made this mirror [jhu.edu] based on the Google cache. It has the full source code, as well as the docs he wrote.

    This is temporary, of course.
  • Microsoft can fix IE (Score:5, Interesting)

    by jonwil (467024) on Friday March 12 2004, @07:08AM (#8541995)
    If what I have seen in the "file list" from the leaked MS code still holds true, all the HTML rendering, CSS, PNG and etc stuff is in DLLs that are totally seperate from the OS and could easily be updated independantly.

    When Microsoft says "we cant fix xyz", it usually means "we cant fix xyz because it would cost us more (in money, programmer time etc) than we are going to gain (in sales, PR etc)"
  • by EqualSlash (690076) on Friday March 12 2004, @07:13AM (#8542019)
    via Google Cache : IE7.htc [google.com]
  • This is a great idea (Score:5, Informative)

    by seldolivaw (179178) <meNO@SPAMseldo.com> on Friday March 12 2004, @07:39AM (#8542127) Homepage
    The code itself at the moment is 27k, which is kinda hefty for most pages on initial load (though you'd only have to load it once per site). However, it includes loads of comments, which might slim it down to about half that if you stripped them out. And the savings in other code areas by not having to write double-code and browser-detection are probably worth it overall.

    This would certainly make development a lot easier... I look forward to trying it out :-)
  • by armando_wall (714879) on Friday March 12 2004, @08:25AM (#8542356) Homepage

    Rather than fixing IE, how about using the same method to make Mozilla render pages designed for IE correctly?

    Mozilla is my favorite browser in both Windows and Linux platforms, and it works so well that whenever I stumble with a broken page, I blame it to site designers, not Mozilla, and move along.

    However, sometimes I need to browse the broken page. Wouldn't it be cool if you could fire up some DHTML code to parse the broken page and make it standards compliant, so Mozilla (and others) can read it flawlessly?

    This wouldn't encourage correct site design, but while in that fight, it would be a nice temporary solution.... do you think this could be done?

  • Cute, but... (Score:5, Insightful)

    by SloppyElvis (450156) on Friday March 12 2004, @08:43AM (#8542459)
    This type of solution doesn't really fix the problem that the CSS2 W3C standards aren't correctly supported in any browser. We deal with having to support old browser versions all the time, and believe me, the W3C standards (particularly the DOM), really help to reduce the amount of logic we need to duplicate for various user agents. However, we haven't the luxury of saying, "bah, forget the old browsers, our users have only the very best". So, our server scripts output HTML 4.01 and scripts redirect on failed functional tests and noscript tags to non-script versions of the site.

    The point is, CSS2 doesn't fill its intended purpose for those who must support legacy apps. Its faster to bite the bullet and format layouts with tables, and it works for ancient browsers (Netscape 4.x anyone?). To me, that's one of the main advantages of JSP, PHP, ASP, and the like: I can include complex logic in my site and output lame ole' HTML 4.01. Code and UI are separated, and everyone is happy.

    Besides, take a lesson from Google, simple layouts are best.
  • by SeaDour (704727) on Friday March 12 2004, @08:49AM (#8542490) Homepage
    Did you hear? McDonald's heard about this move by Microsoft, and was inspired to imitate their strategy. McDonald's is now pushing through the Department of Agriculture to add "Big Mac" and "Chicken Nuggets" to the Food Pyramid, placing them just below the highly-coveted "Dairy Products" block. McDonald's argues that since such a huge percentage of the population is eating their food, everyone should consider their products a nutritional standard.
    • by Nadir (805) on Friday March 12 2004, @06:23AM (#8541778) Homepage
      Fact is that IE 6 doesn't even support CSS2 properly which became a W3C recommendation in 1998.
      • by ender81b (520454) <billdNO@SPAMinebraska.com> on Friday March 12 2004, @06:31AM (#8541824) Homepage Journal
        AFAIK there is no browser available that correctly renders CSS 2.0 -- the entire spec.

        IIRC Moz and Opera do render all of CSS 1.0 correctly and nearly all of CSS 2.0 correctly. But doing some advanced things with CSS 2.0 (especially doing all formatting with it, instead of old table hacks) you really run into problems with both Moz and Opera.
        • by next1 (742094) on Friday March 12 2004, @06:52AM (#8541924) Journal
          current project i'm working on i did all css layout (ie; no tables) and had opposite experience: same code was fine in moz / opera, needed completely different version for ie5 and ie6 due to various bugs in each.

          now actually reverting to tables for a lot of the layout because of it.
        • by JimDabell (42870) on Friday March 12 2004, @07:01AM (#8541969) Homepage

          AFAIK there is no browser available that correctly renders CSS 2.0 -- the entire spec.

          You are right, which is why some of the more esoteric features have been removed from CSS 2 and CSS 2.1 is about to be released.

          However this is a lot different to Internet Explorer 6's situation. There are massive amounts of CSS 2 that simply aren't implemented, such as a whole bunch of selectors and tables.

          The next time you see somebody complaining that CSS layout is hard, remember that there's probably a way to do what they want in a few lines of CSS, but that part of CSS simply doesn't work in Internet Explorer (but does in Mozilla, Konqueror, Opera, etc).

          • by JimDabell (42870) on Friday March 12 2004, @08:01AM (#8542233) Homepage

            It really isn't so shocking that years elapse between the recommendations and implementations

            The W3C have now changed policy so that in order to get to full Recommendation status, a specification has to have at least two independent implementations. If nobody can implement it, it gets kicked back a stage or two for reevaluation. This should help combat the "nice specs, shame about the real world" problem a little.

      • by gusnz (455113) on Friday March 12 2004, @06:56AM (#8541942) Homepage
        And what's more, it doesn't even fully support CSS1, which was released in 1996! Try the ComplexSpiral [meyerweb.com] demo, which is a neat demo of the effects possible in Mozilla, Opera and Safari with the 'background-attachment:' CSS1 property, which IE supports only on the BODY tag. Also, let's add 'position: static' support onto our wishlist (for watermarks/menus on pages) and PNG alpha support, and a whole bevy of regular CSS rendering bugs [positioniseverything.net] that have remained unsolved for years. MS claims "full CSS1 compliance", but in reality they only support the reduced CSS1 core spec.

        And to think it'll be a wait of several years before IE is updated with Longhorn... until then, writing pure CSS sites is going to remain a bug-whacking chore. Let's all be collectively glad that MS fought so hard for their "Freedom to Innovate" back in the anti-trust days ;).

        P.S. redesign slashdot [alistapart.com] using modern web standards, editors!
    • by minus9 (106327) on Friday March 12 2004, @06:23AM (#8541785) Homepage
      but this hack really does show the power of IE

      The power of IE is that it's broken but it may be possible to fix it?

      I have a powerful car for sale if you're interested.

    • > mozilla was last released yesterday - ie6 was
      > released 2+ years ago

      So, you're saying that the problem is not IE but the broken proprietry way of building softwarwe that can't can release new versions in time to answer real customer needs?

      I think I agree :-)

      Gilad
    • by weave (48069) * on Friday March 12 2004, @07:34AM (#8542103) Journal
      And before people start attacking ie for saying that mozilla supports xyz css and ie6 doesn't - mozilla was last released yesterday - ie6 was released 2+ years ago.

      Remember when Microsoft was releasing and improving IE on a rapid basis? Let's see, when did Microsoft allegedly win the browser war? Oh, about two years ago. When did Microsoft stop innovating IE? Oh, about two years ago. Since then, Microsoft doesn't care cause they have the browser market locked up. Therefore we need to download stuff like this and google toolbars to add pop up blocking and all kind of other third party stuff to get IE up to some modern day level.

    • by nhorman (697930) on Friday March 12 2004, @06:59AM (#8541960)
      So I'll ask the burning question here: How is creating a stylesheet to be included in individual web pages considered making IE standards compliant? Wouldn'the the article be more acurate if it read "modifying web site allows it to be rendered correctly in IE6?"
        • by I confirm I'm not a (720413) on Friday March 12 2004, @08:35AM (#8542416) Journal

          Just to clarify slightly - IE7 doesn't rely on serving up a different stylesheet, but an additional 'sheet. In other words, if you reference IE7 as your first 'sheet, existing stylesheets for compliant browsers will then render OK in IE.

          If I've read it right you don't even need to sniff (well, at least not in the old-fasioned, java-script or server-side script sense): it's all done through CSS.

        • by cayenne8 (626475) on Friday March 12 2004, @09:36AM (#8542812) Homepage Journal
          "f you can just sniff and serve up IE a different style sheet to make your site render correct, who cares?"

          The trouble is...what if you don't have a windows computer to see how 'it looks' under IE? I can run just about any other browser under the sun on my development stations, all linux....except IE.

          I'm still trying to figure how to run IE under wine...but, never have been able to do it with no windows partitions...

    • by FireFury03 (653718) <slashdot&nexusuk,org> on Friday March 12 2004, @07:35AM (#8542106) Homepage
      Unfortunately if MS continues like it has done, the web will stagnate with no cool new features appearing. MS has made it clear they're not interested in making IE standards complient or adding any new enhancements. Since 95% of people use IE (and probably have no clue that there is anything other than IE available), if IE is never enhanced then web developers will forever be stuck in the trap of never being able to use any cool new features that IE doesn't currently support. Very few web developers will be happy adding features to their website that make it unusable for 95% of their visitors (although it seems that professional web developers have no problem with making their sites only work with IE).

      What I'd love to see someone do at some point is re-skin FireFox to look like IE and then abuse one of IE's many security holes to replace IE with the reskinned FireFox on any machine that visits the website. :)