5 ms·
I agree with the overall message- you should be thoughtful with all your dependencies. You should only add complexity when it makes sense. However, the author
by latj 13y ago
I agree with the overall message- you should be thoughtful with all your dependencies. You should only add complexity when it makes sense.
However, the author goes beyond just selector vs. getElementById().
Does the way the author uses XMLHttpRequest work in other browsers the way it works in IE? I honestly dont even remember anymore.
How about the code for fade? I never even knew the details of this feature. And I'm not sure I want to.
- Jach 13y agoConsidering XMLHttpRequest is what other browsers used before IE caught up, I assume it does work the way you'd expect across modern browsers. I'd have to check the standard and IE8+'s conformance to the standard to be sure. That's what this post is really about for me, reminding that modern browsers follow a standard that allows for getting rid of most of jQuery. Reading it also made me recall a post from 2005 by PHP's creator: http://rajshekhar.net/blog/archives/85-Rasmus-30-second-AJAX-Tutorial.html http://rajshekhar.net/blog/archives/85-Rasmus-30-second-AJAX... (Note IE uses ActiveXObject.)
- annnnd 13y agoXMLHttpRequest was first introduced in IE5. I think in retrospect MS regrets its introduction, but that is another discussion entirely.
- fish2000 13y agoAs I recall, they specifically implemented it in order to facilitate Outlook’s web interface – their collective regret may be tempered by the satisfaction they got from all those high-margin site license sales to which that feature contributed.
- billmalarky 13y agoI wouldn't mind hearing a snippet of that discussion. Why would MS regret XMLHttpRequest?
- mkr-hn 13y agoMicrosoft twiddled its thumbs while the web grew up and around Windows using the technology the company introduced.
- billmalarky 13y agoThat makes complete sense. Never thought of it that way.
- nostrademons 13y agoIE has been basically standards-compliant for XHR since IE9, and possibly before: http://www.w3.org/TR/XMLHttpRequest/#interface-xmlhttprequest http://www.w3.org/TR/XMLHttpRequest/#interface-xmlhttpreques... http://msdn.microsoft.com/en-us/library/ie/ms535874(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/ie/ms535874(v=vs.85)...
- voltagex_ 13y agoFor IE9, don't you need IE-specific code for cross domain requests?
- nostrademons 13y agoYeah, you need XDomainRequest for CORS requests in IE8 and 9. IE10 is fully standards-compliant. http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdoma...
- btd 13y agoIt is very castrated, better to use hidden iframe + window.postMessage for cors in ie8 and ie9.
- duncans 13y agoI don't think "castrated" is the word you meant :-) Perhaps "constrained" or "restricted"
- Dylan16807 13y ago...why not? "to render impotent or deprive of vitality"
- kishor_gurtu 13y agoFunny, because IE invented XHR.
- mokkol 13y agoFor fading, I recommend just adding or removing a class and let css transitions do the job. If you dont mind it not working in IE8 of course
- simons 13y agoand IE9: http://caniuse.com/css-transitions http://caniuse.com/css-transitions. Pedantry aside, your point stands, CSS transitions can use the GPU and degrade gracefully.