2

Is it possible to force browser to not using cache and download all files (html/js/css) every time? I am looking for a server side solution.

4
  • Turning off, or forcing an empty cache is only available on the Client's browser settings. The only tools I know of server side enable faster caching for serving pages
    – eyoung100
    Aug 29, 2014 at 13:38
  • A search for 'cachebuster' should help somewhat - see also stackoverflow.com/questions/7281127/…
    – joesk
    Aug 29, 2014 at 15:47
  • What web server are you using?
    – closetnoc
    Aug 29, 2014 at 23:15
  • @closetnoc I use servers Apache2 and Jetty.
    – Colargol
    Sep 1, 2014 at 7:27

1 Answer 1

2

You can do this on the web server by sending the correct HTTP headers for those content types. See the W3C HTTP cache control rules. The most important header for your scenario is:

Cache-Control: no-cache

This directive alone should be enough to ensure no proxy or user agent will cache the content.

For Apache, use mod_headers to send cache directives based on the content type requested.

1
  • Yeah, not sure what I was thinking. That's what I get for insomniac posting.
    – dartonw
    Aug 30, 2014 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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