Why still make conditional GET (304) with with expires header

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

Why still make conditional GET (304) with with expires header



I'm learning about web performance.



And as I know, when make request to require a resource with header: "expires" or "cache-control" that still valid, the browser'll not make a conditional GET to ask server if a resource has been modified.



So, why the browser alway make conditional GET when i make this request: https://www.debian.org/Pics/debian.png



screeshot request information





The server response is 304, so no content has been send to the client since the client already has the content/data.
– Progman
2 hours ago




1 Answer
1



Take a close look at the request headers: "Cache-Control: max-age=0".



When refreshing an URL, your browser always adds this header to make sure it's "refreshed". If you want to see your real browser's behavior, try navigating to another url then click the back button, Chrome should get the image from its cache.



I've just tried, it does!






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

Trying to Print Gridster Items to PDF without overlapping contents

Hystrix command on request collapser fallback