Question

We have an (old) intranet site which has this setting

Every time I visit the page : true

enter image description here

But still I can see in developer tools many 304 replies :

enter image description here

Question :

  • Why is that ? How can I force to see all responses as 200 ?

Related info :

IIS 7.5

It happens in IE9-10 ( the site run only on IE) ( the browser mode is changed to ie9 because it is an old web site (intranet) which wasnt adjusted to the new browsers.

Using fiddler - it also shows 304.

enter image description here

enter image description here

enter image description here

Request header example :

enter image description here

Was it helpful?

Solution

Checks for newer versions of stored pages every time I visit the webpage

Simply means that IE will ('check', hence) include the caching-related headers (If-Modified-Since, ETag etc) in the request. The server will then return 200 only if it feels that there's a cache 'miss'.

Also, note that the settings in question ONLY apply when the server fails to specify the cache-freshness lifetime using a Cache-Control or Expires response header. See the Conditional Requests section of this article to learn more.

If you want to configure your server to disable client-side caching for the entire directory, try this:

<configuration>
  <location path="your_assets_dir">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlMode="DisableCache" />
      </staticContent>
    </system.webServer>
  </location>
</configuration>

OTHER TIPS

http 304 code is SERVER code, so your browser and its' settings not really relate to each other, 304 code means that browser sent if-modified-since, and server checked this date and returned "not modified"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top