How to enable Caché to get a “304 Not Modified” status on server requests
Welcome!
We don’t use server caching on our end here, so this is not possible. You can use a third party such as Cloudflare (If you have a custom domain) to get server caching.
EDIT: I got confused with something else, please see Admin’s reponce below!
Thanks
The 304 Not Modified response is generated by browser cache, not server cache. So what Greenreader9 said does not apply here.
I just checked and I was able to trigger a 304 response from the server.
To get a 304 Not Modified response, you’ll need the following:
- The request should be for a static file: an image, CSS, JS or HTML file. Our servers don’t set browser caching headers for the output of PHP scripts.
- The URL may not have any query parameters. Some websites, most notably WordPress, adds a query parameter to every URL like
http://example.com/wp-content/themes/twentytwentytwo/style.css?ver=1.2
. This breaks the caching system. - Your browser must have the file cached (i.e. it has been downloaded before, and has not been cleared or evicted).
If all of these conditions are met, the server will respond with a Last-Modified
header that contains the file modification time for the particular file. Then, when the browser requests the file again, it will send a If-Modified-Since
header with the same value. If the file was not modified since the last page view, the server will respond with a 304 Not Modified status.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.