Vanwege onderhoudswerkzaamheden die uw ervaring zouden moeten verbeteren, heeft deze website beperkte functionaliteit. Als een artikel uw probleem niet verhelpt en u een vraag wilt stellen, kan onze ondersteuningsgemeenschap u helpen in @FirefoxSupport op Twitter en /r/firefox op Reddit.

Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

J2EE application caching issue in Firefox 64 after setting "Cache-Control", "no-store, no-cache, must-revalidate" | "Pragma", "no-cache" |

  • 2 antwoorden
  • 1 heeft dit probleem
  • 1 weergave
  • Laatste antwoord van mohanasundaram

more options

I have J2EE web application site which sends the response header as cache:control set to "no-store, no-cache". After logout when the user is pressing the back button of the browser, user is thrown with the cache-expired page, and it’s working as expected. But if the user clicks on the view-page-source on the cache expired page, user is shown with the source code of the previous logged in page with all confidential data pertaining to logged out user. Please let us know do we need any specific response header for Mozilla Firefox to disable the caching of the source code? Your help is much appreciated.

       p_response.setDateHeader("Expires", -1);
       p_response.setHeader("Expires", "0");
       p_response.setDateHeader("Last-Modified", System.currentTimeMillis());
       p_response.addHeader("Cache-Control", "no-store, no-cache, must-revalidate");
       p_response.addHeader("Cache-Control", "post-check=0, pre-check=0, false");
       p_response.addHeader("Pragma", "no-cache");

Thanks

I have J2EE web application site which sends the response header as cache:control set to "no-store, no-cache". After logout when the user is pressing the back button of the browser, user is thrown with the cache-expired page, and it’s working as expected. But if the user clicks on the view-page-source on the cache expired page, user is shown with the source code of the previous logged in page with all confidential data pertaining to logged out user. Please let us know do we need any specific response header for Mozilla Firefox to disable the caching of the source code? Your help is much appreciated. p_response.setDateHeader("Expires", -1); p_response.setHeader("Expires", "0"); p_response.setDateHeader("Last-Modified", System.currentTimeMillis()); p_response.addHeader("Cache-Control", "no-store, no-cache, must-revalidate"); p_response.addHeader("Cache-Control", "post-check=0, pre-check=0, false"); p_response.addHeader("Pragma", "no-cache"); Thanks

Alle antwoorden (2)

more options

Hi,

the use of the cache is documented in the DND documentation, which I believe will be answered by the following links


https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

https://developer.mozilla.org/en-US/docs/Web/API/Request/cache


thank's

more options

Thanks for the reply, the options in the specified url works fine only for chrome and IE browser and not for Firefox 64.02 Here is the snippet of the code:

p_response.setDateHeader("Expires", -1);

p_response.setHeader("Expires", "0");

       p_response.setDateHeader("Last-Modified", System.currentTimeMillis());
       p_response.addHeader("Cache-Control", "private, no-store, no-cache, must-revalidate");
       p_response.addHeader("Cache-Control", "post-check=0, pre-check=0, false");
       p_response.addHeader("Pragma", "no-cache, no-store");
       p_response.addHeader("Clear-Site-Data", "cache, cookies, storage, executionContexts");
       p_response.addHeader("cache", "force-cache");

Thanks