Probably 4kB more than loading jQuery from cache :)
Yep. But with jQuery, the browser parse 91kb of JS, this is the difference...
Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
121–130 of 145 posts
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#122I know it's awfully tempting to obsess on something that is easy to measure , like file size. I also know it's tempting to imply things like "twice the file size means twice the page load time". But it's not true. It's NOT true. Look at this video at 6m30s: http://channel9.msdn.com/Events/Build/2012/3-132 Productively optimizing a web page is no different than optimizing any other code. If you want to know why a web…
People who say "hey, what's an extra 30KB for one library? It's only like 10x larger" will tend to reach a similar conclusion at every decision point. And that's why the internet is full of massive, bloated, slow web pages. Single decisions don't cause bloat. Bloat comes from a slack attitude towards efficiency.
I'm not saying this project is an important breakthrough, but I definitely applaud the effort. I've always been surprised at the large size of jquery. I'd love to see a benchmark for runtime performance, including a comparison of parsing time and a benchmark of common operations.
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#123I know it's awfully tempting to obsess on something that is easy to measure , like file size. I also know it's tempting to imply things like "twice the file size means twice the page load time". But it's not true. It's NOT true. Look at this video at 6m30s: http://channel9.msdn.com/Events/Build/2012/3-132 Productively optimizing a web page is no different than optimizing any other code. If you want to know why a web…
There's only one way to make a tiny page that loads super fast - and that's to make every single decision with an eye towards efficiency. People who say "hey, what's an extra 30KB for one library? It's only like 10x larger" will tend to reach a similar conclusion at every decision point. And that's why the internet is full of massive, bloated, slow web pages. Single decisions don't cause bloat. Bloat comes from a sla…
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#124Earlier quoted context omitted.
There's only one way to make a tiny page that loads super fast - and that's to make every single decision with an eye towards efficiency. People who say "hey, what's an extra 30KB for one library? It's only like 10x larger" will tend to reach a similar conclusion at every decision point. And that's why the internet is full of massive, bloated, slow web pages. Single decisions don't cause bloat. Bloat comes from a sla…
But the reality is, everyone that visits your site already has jQuery in their cache, because the common cdn sources are so ubiquitous, this making this 4k library actually add to your page load footprint. Using the most common, most likely to be a cache hit library is more efficient than using the smallest.
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#125Earlier quoted context omitted.
Discussion of the issue here (disclaimer, I started the pull request) - https://github.com/h5bp/html5-boilerplate/pull/1327 The basic gist is that there is great fragmentation in the cache eco-system, and so there is no guarantee that the user actually has the version of jQuery cached that you are requesting. Alex Sexton brought up in a talk at jQueryTO that there are also the time for the DNS request itself to consi…
I disagree with your assessment (and so does the majority of people on that pull request, it seems). It's always better to use a CDN because: 1. It has a chance to be already cached (specially if you use Google's CDN). 2. All browsers nowadays do 6 parallel requests per host. So using DNS prefetching with `rel=dns-prefetch` will be faster. 3. If you bundle jQuery with your site's JS files, every time you change a sin…
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#126Earlier quoted context omitted.
But the reality is, everyone that visits your site already has jQuery in their cache, because the common cdn sources are so ubiquitous, this making this 4k library actually add to your page load footprint. Using the most common, most likely to be a cache hit library is more efficient than using the smallest.
People need to stop saying this.
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#127Earlier quoted context omitted.
People need to stop saying this.
Please elaborate.
(No idea about more current versions of iOS or browser-caching on other mobiles OSs.)
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#128Earlier quoted context omitted.
Test this, you might be surprised. I strongly doubt it, because there are so many versions in use, and as of 2012 only 25% of jQuery sites even used Google CDN, by far the most popular CDN — most hosted it elsewhere. http://royal.pingdom.com/2012/06/20/jquery-numbers/ I have vague memories of reading a post with a stronger conclusion — that CDN caching was basically a non-issue, it would so rarely work — but to my fr…
You might be looking for this - http://statichtml.com/2011/google-ajax-libraries-caching.htm...
tl;dr for lazy HN readers: "using Google's CDN to load jQuery isn't likely to benefit the majority of your first-time visitors." As of 2011, jQuery 1.4.2 was by far the most common version and even that was only loaded via googleapis.com on 2.7% of websites.
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#129Earlier quoted context omitted.
Most browsers probably have all versions of it cached by now too.
Test this, you might be surprised. I strongly doubt it, because there are so many versions in use, and as of 2012 only 25% of jQuery sites even used Google CDN, by far the most popular CDN — most hosted it elsewhere. http://royal.pingdom.com/2012/06/20/jquery-numbers/ I have vague memories of reading a post with a stronger conclusion — that CDN caching was basically a non-issue, it would so rarely work — but to my fr…
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#130RyeJS is another alternative, though it focuses on speed, modularity and having an understandable source instead of size. Clocking at 6.2kb. http://ryejs.com/ (disclaimer: I'm one of the authors)
Focus on speed and modularity next to the clear code sounds interesting, but supporting IE 9+ only is kind of a bummer here, because it means "no" for XP users (I use XP64 on my desktop for instance) and there is still substantial number of them. (And I do curse Microsoft for making IE 9 Vista+ only browser, which is quite likely explainable by use of some shiny new undocumented API, that wasn't available in XP and b…