Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.




Funny, because IE invented XHR.


For IE9, don't you need IE-specific code for cross domain requests?


Yeah, 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/xdoma...


It is very castrated, better to use hidden iframe + window.postMessage for cors in ie8 and ie9.


I don't think "castrated" is the word you meant :-) Perhaps "constrained" or "restricted"


...why not?

"to render impotent or deprive of vitality"


For 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


and IE9: http://caniuse.com/css-transitions.

Pedantry aside, your point stands, CSS transitions can use the GPU and degrade gracefully.


Considering 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... (Note IE uses ActiveXObject.)


XMLHttpRequest was first introduced in IE5. I think in retrospect MS regrets its introduction, but that is another discussion entirely.


As 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.


I wouldn't mind hearing a snippet of that discussion. Why would MS regret XMLHttpRequest?


Microsoft twiddled its thumbs while the web grew up and around Windows using the technology the company introduced.


That makes complete sense. Never thought of it that way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: