Will content requested over https still be cached by web browsers or do they consider this insecure behaviour? If this is the case is there anyway to tell them it's ok to cache?
I'm trying to figure out why they wouldn't cache files received over https without the cache-expiry (or hints in the URL, such as a ? with parameters in the URL) telling them otherwise?
Have you checked your own cache?
By default web browsers should cache content over HTTPS the same as over HTTP, unless explicitly told otherwise via the HTTP Headers received.
This link is a good introduction to setting cache setting in HTTP headers.
is there anyway to tell them it's ok to cache?
This can be achieved by setting the max-age
value in the Cache-Control
header to a non-zero value, e.g.
Cache-Control: max-age=3600
will tell the browser that this page can be cached for 3600 seconds (1 hour)
The paranoid option is to never cache HTTPS, because it should not be readable by anybody outside of the current session, including others on the local computer reading out of the local cache. How paranoid the creators of browsers are varies.
It depends on the browser.
For example, in Internet Explorer, you to to Tools > Internet Options > Advanced tab > Security section > Do not save encrypted pages to disk. It appears to be unchecked by default in IE6, 7 and 8 Beta 2.
I tried to find a similar setting in Firefox but my limited research did not identify any specific setting in the UI that would do that. There is probably a setting in about:config
that would stop caching of https content, but again, I wasn't able to find anything doing some limited searching on Google.
In general it appears browsers will cache content received over https unless instructed otherwise.
Yes, they will. By default, Firefox doesn't cache SSL objects on disk, but Firefox 3+ now caches them on disk as well provided they have a "Cache-control:public".
It's a privacy feature.
I'm not sure about other browsers. Setting "Cache-control:public" on objects which are public (i.e. not user-specific) is probably a good idea.
Apparently Firefox does not cache https content (there is an open bug regarding it). Internet Explorer will respect the headers and cache appropriately.
Edit: Firefox3 does now support caching: http://blogs.gnome.org/jamesh/2008/05/01/firefox-ssl/
There is a very nice problem concerning HTTPS caching in IE, namely, there are times, that, because certain object (e.g., an embedded ActiveX) is declared non-cacheable (via Pragma: no-cache, or via Cache-Control), it will not be displayed at all. See, for example, here:
Yes browsers will cache content over HTTPS check this link http://neopatel.blogspot.com/2010/02/firefox3-and-caching-https-content.html