I am sending the following header in the reponse. "Cache-Control: public, max-age=300"
, but still every time I hit refresh I get a 200
response(the request is made to he server again). Same happens if I add the "Expires" header.
But if I add a ETag to the headers, then I get 304
on refresh(the request goes to the server, the server prepares the response, then matches the ETag and returns a 204
response).
What should I change so that "Cache-Control"
header is used and the
content is served from local cache and no request is sent to the server until the age becomes more than "max-age"
?
EDIT: Here is an image that doesn't get cached https://image-dev-dot-quizizz-dev.appspot.com/resource/gs/quizizz-image/rejected.jpeg
max-age=300
? it sets for 300 seconds. – Prajwal