Reputation: 6037
I have set content caching on a specific folder by following the local web.config method. I don't think it works, and I would like to fix this.
I activate the cache using the IIS / HTTP Headers / Common headers feature. I set them to 1 day of expiration.
I opened a page with Google Chrome in private navigation, and then open the Network tab in the console.
The first time I load the page, everything loads from the site, obviously.
If I refresh the page, I see 2 types of loading in the Network console:
200
, and a size of (from cache)
.304
and their size is displayed.So, I guess the caching setting doesn't work? Or does the 304
response means that it's loaded from the cache? If they aren't, how can I make it work ?
Thanks !
Upvotes: 0
Views: 305
Reputation: 48230
304 is a way of caching. The server says that the content of the resource hasn't changed and it doesn't have to send the response content (the response content is empty).
This is quite convenient. The browser still makes the request for the resource (so that when it changes the new content is delivered to the client) but the server possibly saves the bandwidth by sending 304 + empty body instead of 200 and body content.
Upvotes: 1