I have Wordpress blog that I write blog posts about javascript. I update the same post by generally 12-13 days or so. But sometimes I push updates daily.

After I update my article and publish to changes, I go to the article page with Firefox but I see the cached page rather than the updated one. Here is an example post url.


This is my response header for the same page if it is first time viewed.

Response Header

After it is viewed first time, if I click in location bar of Firefox and press Return, the page is loaded from cache. Request header is below. Because it is loaded completely from cache it does not have Response Header.

Request Header

It seems clear the Cache-Control might be the main issue but I do only want to prevent page (HTML) cache but not the style and image files. I already have WP-Cache plugin to cache files and I use CDN to serve site images.

In this context, I find Firefox useful to load CSS, Javascript and Image files from cache but I do not want Firefox to cache page text context. To get the latest version of my page content, I have to use CTRL + SHIFT + R to force reload the page but this time all CSS, Javascript and image files are also downloaded from server unnecessarily.

Is it possible to download page content always from server but load CSS, Javascript and Image file from cache?

1 Answer 1


You can set up apache to set the "expires" header by the type of content. This functionality requires two modules be enabled:

LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so

Then you can configure different expires times for you html content compared to all your content:

ExpiresActive On
ExpiresDefault "access plus 5 days"
ExpiresByType text/html "access plus 1 seconds"

Here is the documentation for mod_expires.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.