Caching using location.reload () is different between browsers

MDN says location.reload() takes one optional argument.

forcedReload

It is a boolean flag that, when true, forces the page to always reload from the server. If it is incorrect or not specified, the browser can reload the page from its cache.

But this argument does not work in IE and Chrome.

The table below shows which header was sent to the server ( no-cache means Pragma: no-cache ):

 +---------------+----------+-------------------+-------------------+ | | IE11 | Firefox47 | Chrome54 | +---------------+----------+-------------------+-------------------+ | reload(false) | no-cache | If-Modified-Since | If-Modified-Since | +---------------+----------+-------------------+-------------------+ | reload(true) | no-cache | no-cache | If-Modified-Since | +---------------+----------+-------------------+-------------------+ 

IE and Chrome send different caching headers, and not just ignore the forcedReload argument.

Furthermore, the W3C Spec of this method does not seem to mention caching.

So my question is ...

  • What should I expect from location.reload() about caching?
  • Is there a (standardization) discussion of this issue?
+5
source share

All Articles