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

OMG LOL. Have they never heard about jQuery? Christ, they could have made the code so much more elegant.


So you think they should inject a third-party dependency instead of just some inline js? And that would make it more elegant?


They could just inject it inline. No problem there.

The whole document.write block 27-51 (possibly the CSS-block too, but I'm not sure about this) could be written far more elegant in jQuery.

But the real saving is that "drag and drop" code - jQuery would abstract all that isIE/isNS crap from them.


The block of code they injected here was 7.9 KB (3.7 KB gzipped). jQuery is 93 KB (33 KB gzipped). So no, I don't think that would have been more elegant. Injecting anything into users' pages without permission is insane. Injecting a huge library like jQuery would be even more insane.


As long as you're already injecting something, why not go all the way?


Wasted resources. The difference in size between the two (using the numbers from the above comment) is 85.1 KB. Now think of all the customers Comcast has and you will see quickly the difference it makes with a few KB.


Oh man, I thought you were being sarcastic earlier!?

...unless you're still being sarcastic?


Their jQuery code would probably look like http://enterprise-js.com/23, with aggressive caching methods used on all jQuery selectors: http://enterprise-js.com/27


Wait, what? Why didn't I know about this website before? I am writing all these down!!!11oneoneone EOSarcasm


-1 not enough jQuery


right tool for the right job.

a 1 page script written for comcast does not demand jQuery.

That's not to say it would have improved it.


It at least would remove this damn ugly browser switching code. Hey, it's 2013, no need to reinvent the wheel...


You're missing the point. You're too focused on the code writing part. It's the extra unnecessary resources loaded from jQuery.

The difference in size is 85.1 KB (according to an above post). 85.1 KB * 100,000,000 (Just an example of the number of times it is loaded) = 7.92555511 terabytes of wastes resources.


jQuery would make this worse. It would be like adding a truck to be towed by a car that's running out of gas anyway.


But think about the Netscape 6!


I didn't know you could get downvoted this hard on HN... I had to select it to even read this!




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

Search: