Webserver: apache 2.4
Pages created in PHP
Test browser: Firefox
Cache-Control: no-cache
Etag: set
Relevant apache config:
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L,NC]
<filesMatch ".(css|js|jpg|jpeg|png|gif|ico)$">
Header set Cache-Control "max-age=31536000, public"
</filesMatch>
When reloading a page, all of the resources other than the html document itself are being cached as expected. The resources files that can change have fingerprints based on the modification time (which has exactly 10 digits) to allow changing, The URL rewriting maps such files to the "base" file.
The issue is that I do not see the static page as being cached. When the page is reloead via Enter in the address bar, or clicking on a link, in Firefox Dev Tools there is a Size and a Transfer size. However, for comparison, if I use the back button followed by the forward button to load the page, the html document is cached.
I am wondering what is preventing the caching. I understand the the combination of no-cache and the Etag should allow the server to return "unchanged" rather than the content.
I have seen that having a query string could prevent caching under these circumstances. At first my requests did have a query string, but I have created some files without query strings and still get the same results.