Cripple the Google CDN’s caching with a single character
encosia.com
encosia.com
I don't think that's correct at all. Perhaps browsers have more secure defaults with SSL, but if you're explicit and specify Cache-Control headers, it'll be cached.
The jquery version specified on Google CDN's have Cache-Control public, so it'll be cached on disk.
Just put up a blog post about this: http://news.ycombinator.com/item?id=2120773
On top of that, that's not "crippling google's CDN caching" at all, that article is over exaggerating.
You've glossed over the actual point of the post though. Even if every version of every browser did respect the cache-control header for SSL content, over-referencing the SSL version of the script is still fragmenting your local cache unnecessarily. With many thousand sites already using the regular HTTP references to the Google CDN, sites that use the HTTPS reference on HTTP pages are missing out on the cross-site caching benefit, which is probably the biggest advantage of using a shared CDN to begin with.
I've been seeing more and more people using the fixed HTTPS reference on simple sites like WordPress blogs, thinking it's more secure or that it allows them the flexibility to offer their site through both HTTP and HTTPS. In reality, that's just harming their site's performance for most visitors, whereas the protocol-less reference gives them the best of both worlds. Hence the post.
This seems like a good solution -- just encourage everyone to use HTTPS to avoid the cache fragmentation.
To ensure airtight security, pages served via
SSL should contain no references to content served
through unencrypted connections. The reasoning behind
this rule is sound. After all, the browser has no way
of knowing whether an image contains a chart with
sensitive financial data or if a JavaScript include
contains a JSON collection detailing the user’s medical
history.
I don't see how what the browser doesn't know is relevant. The type of references are determined by the page author, who should know which reference sensitive material and which do not.I ran this simple HTML page through Browser Shots to test about as wide a variety of browsers as possible, quick and easy:
<html>
<head>
<title>Testing protocol-less URL</title>
</head>
<body>
<p>A message should hopefully appear below me...</p>
</body>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery !== 'undefined') {
jQuery('body').append('<p>Protocol-less reference worked!</p>');
}
</script>
</html>Why would you expect them to accept that? The URIs aren't protocol-less, they have relative protocols, and there's nothing to relate the URI to.
I mentioned it because I can see how it would be easy to notice that behavior on the desktop, see the same thing fail on an iPhone, and then assume that mobile Safari doesn't support these URLs at all.