Hacker News new | past | comments | ask | show | jobs | submit login

I had split jquery 1.6 to two parts just put some code to string an then used exec, hack but work.

Why eq: 1.css 14kb -250ms engine.js 12kb 250ms

jquery 33kb 320ms ???

so

jquery1.js 13kb - 243ms jquery2.js 14kb - 250ms

So my page open 100ms faster :P




Dude, I don't understand you. You did what?

I don't think you gain anything by splitting it in 2 files. It could happen if the browser downloads the 2 files in parallel, but it can make your page load actually worse because you do not have a guarantee of parallelism (there's a limit to how many resources you can download in parallel from the same domain and adding multiple domains is not without cost because of the extra DNS lookup, which is also a big problem on mobile phones) and you're also introducing eval().

If anything, a better hack would be to load it such that it does not block the page being loaded.

See a sample how it's done in this project: https://github.com/alexandru/crossdomain-requests-js/wiki/Us...


Firefox is 6 parlsee but my website is 3 files so

http://stackoverflow.com/questions/7133749/can-i-split-jquer...




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

Search: