Static Asset Compilation
autoref.com
autoref.com
For reference: http://developer.yahoo.com/blogs/ydn/posts/2007/04/rule_1_ma...
It's laudable that you are paying attention to caching, but you don't compile all your files in to one file. It seems like you could pick up a lot ground here by at least concating all css into one file, and js in to one file.
Also you could load jquery from the Google AJAX API endpoint. That way the users has a higher chance of having already loaded jQuery.
Also using the same CSS/JS products across multiple pages would help.
For a warm cache, it's better to split assets up so they are cached in finer chunks. If I added jQuery in to every page JS, there would be few HTTP requests but it would pull jQuery every time, making the payload much larger. There's a balance. I'll write another post about warm vs cold cache optimizations soon.
"using the same CSS/JS products across multiple pages would help."
Definitely. Using jQuery on half your site and YUI on the other half is pretty bad from all angles.
"you could load jquery from the Google AJAX API endpoint."
Yeah. Two reasons we don't: 1. I'm in security, and trust no one. 2. HTTPS connection reuse vs negotiation with another host. I have yet another post in the pipe about SSL optimizations.
Of course, not all pages get all three chunks, but I find it's a reasonable tradeoff between reducing the number of requests and not just including everything on every page.
https://developers.google.com/speed/docs/best-practices/cach...
The more important point is that the failure mode is simply that the assets load from the CDN as if there were no squid proxy. This is not ideal, but it's not so bad either.
If you don't, there might be a small amount of time before your app is reloaded where your app uses newer resources.
Surely a nice thing to have, but does it help?
The process I use computes the hash of every file and creates a dependency map then I use the hash of the contents of a file and its dependencies to rename the file.
E.g. if the PNG was 32 bit, and had a full color palette but was filled with a single 8 bit color. You could safely, and "loss-ily", convert the PNG to 8 bit and replace the entire color palette with the single entry for the color that is actually used.
That said, PNGQuant uses dithering so there will often be changes apparent if you perform a pixel by pixel comparison in code.
Just like you, I can't visually identify the difference between a PNGQuant image and the 'raw' PNG that was used to create it (at least not on any images that I've seen so far).
https://developers.google.com/closure/compiler/docs/api-tuto...
I would have thought that most web frameworks do all these things for you automatically by now.
It does mean we use more space on s3 though, but it guarantees we won't miss re-seeding some of the files.
Full disclosure (bizdev at AutoRef)