Better HN
topnewbestaskshowjobs
Log inSign up

autoref

98 karma · joined Sep 8, 2012 (14y ago) · 7 submissions

Submissions

1.

Protocol-Relative URLs to Fix Mixed-Content Warnings(autoref.com ↗)

41 points · by autoref · 14y ago · 24 comments

comment 14y ago · link · parent

Solution: use protocol-relative URLs now

http://autoref.com/blog/2012/09/13/the-tech-behind-autoref-p...

comment 14y ago · link · parent

This isn't recommended since many browsers and proxies do not cache resources that are referenced using a query string, even if a cache-control or expires header is set appropriately. Google says Squid up to 3.0 will not do so:

https://developers.google.com/speed/docs/best-practices/cach...

comment 14y ago · link · parent

The bad part is no file is cached between pushes, right?

comment 14y ago · link · parent

An excellent point, but you have to consider warm cache vs cold cache optimizations. For a cold cache, it's better to combine assets and reduce HTTP requests. We do that on our homepage.

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.

comment 14y ago · link · parent

Right. Images and fonts have to be written and hashed first, then used in the template rendering of the CSS file. The CSS references the assets with hashes in the filenames.

7.

Static Asset Compilation(autoref.com ↗)

48 points · by autoref · 14y ago · 39 comments