Iis – Http header 304 and caching

cachehttphttp-headersiis

Our company uses these settings( don't ask me why) – for every request they want a new request from server. this is an intranet system which uses only IE.

They defined it in :

enter image description here

We also have windows authentication NTLM in the iis7.

I have 2 questions please.

Question #1)

when the browser make a request ( css ) :

(leave the 401 response for now – this is how ntlm works)
enter image description here

He is requesting it with if-modified-since header.

why is he adding this header ? How can I configure it ? why doesn't he use the settings from IE and try to download it each time – as I showed in the first picture ?

Question #2)

The response ( after ntlm negotiation) for that was :

Response with Not-modified which is 304 header. and I assume its because we sent the request with the if-modified-since header.

But there is a problem.

He is actually tells me to download from my cache.

But I told him explicitly in the IE settings – not to load from cache.

Wham am I missing here ?

Thanks a lot.

enter image description here

Best Answer

Q1

why is he adding this header ?

Because the browser already has a copy of the content in the cache. This happens if

1) it's past it's expiry date

2) the browser has been configured to check for newer versions every time

How can I configure it ?

You can't do anything about (1) - this just how HTTP works. For (2), change the config to check "Automatically"

Q2

But I told him explicitly in the IE settings - not to load from cache.

No - the instruction to the browser was to check for a newer version - the webserver will only return a new version (with a 200 response) if the conditional parts of the request are matched.