Question

Browser Caching with Nginx's issue

Hallo,

i have use this tutorial but i have the problem. I put html files on epoch but these files are cached.

Clould anyone help me out please?

https://i.imgur.com/UlM31tr.png

atm i have add this code to resolve the problem, but im still confused why i need this

        add_header Last-Modified $date_gmt;
        add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
        if_modified_since off;
        expires off;
        etag off;


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This comment has been deleted

It appears to be working for me:

~ ❯❯❯ curl -i https://anzahcraft.de/test.html
HTTP/2 200 
server: nginx
date: Sun, 25 Mar 2018 19:26:02 GMT
content-type: text/html
content-length: 1024
vary: Accept-Encoding
last-modified: Sunday, 25-Mar-2018 19:26:02 GMT
cache-control: no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0

Do you get the same issue in a different browser? There’s an option to disable caching while the developer tools window is open in the developer tools settings pane. What happens when you enable that and reload the page?