Questions tagged [no-cache]

A Cache-Control response directive in the HTTP header

93 questions
1
vote
0 answers

Firefox Document Expired Issue over https

I have a site that is running a combination of Perl and HTML. I've got a problem with the search function, where after I've searched for a keyword, and clicked the back button I get the Firefox "Document Expired" page. I've read several posts…
hlh3406
  • 1,382
  • 5
  • 29
  • 46
1
vote
1 answer

no-cache attribute misunderstanding

I am creating a http client cache, but I have a doubt about the no-cache field. Official documentation says: If the no-cache directive does not specify a field-name, then a cache MUST NOT use the response to satisfy a subsequent request without…
Massimo
  • 3,436
  • 4
  • 40
  • 68
0
votes
1 answer

Why can I navigate to a page via browser's back button though cache = disabled?

I have set in my mastersite of my asp.net application the following that the browser does not cache the pages and the user cannot navigate via back (and forward) buttons; Response.Cache.SetCacheability(HttpCacheability.NoCache) …
Keith L.
  • 2,084
  • 11
  • 41
  • 64
0
votes
1 answer

Creating logout such that no back action takes place in JSP

I want to create a logout action in JSPs such that there is no back action. Presently, I am using session.invalidate method to kill my existing session and directing to login page. But that doesn't prevent the page getting loaded if the user presses…
Prasad
  • 5,946
  • 3
  • 30
  • 36
0
votes
1 answer

Which is better for no-cache pragmas? Setting it in the header or metatags or both?

I'm currently using Zend Framework and for some of the actions in various controllers it has the pragmas set for no-cache. Some of them use metatags for this and others set the headers. Is it better to set it in the headers or in the metatags? Which…
0
votes
1 answer

How can I get the back-button to work with a JSF app with no-cache set?

This is a problem I inherited. We have a JSF/RichFaces/Seam app, which for security reasons has no-cache set. The problem comes when users hit the back-button, causing a repost of a form. Sometimes (and it is inconsistent) the form re-POST after…
0
votes
0 answers

Don't keep cache for basic authentication header not working

I am currently working on an api which contains repositories. And I'm stuck on a PHP feature. Overall, we have tables that are open for everyone to read so no worries and other tables that contain sensitive information and therefore require…
Onyx
  • 35
  • 6
0
votes
2 answers

How to optionally turn off Apollo caching

What I need is to NOT cach the data if Query has a specific parameter. I have this hook for queries, it has dafault 'cache-first' value for fetchPolicy property (default Apollo behaviour): import { getItem } from 'utilities/sessionStorage'; const…
0
votes
0 answers

Revalidation max-age=0, must-revalidate, no-cache no risk 504

To indicate the need to check the validity of the saved cache before each subsequent request, we can use Cache-Control: no-cache with the validator (ETag or Date+Last-Modified) in the server response. A more compatible way to revalidate, if I…
0
votes
0 answers

What is the difference between using If-None-Match header and using Cache-Control: no-cache?

My understanding of Cache-Control: no-cache is that it always asks the server to validate the cache. I understand that "ETag" is used for validation in this case, how is this different from the client requesting validation using the "If-None-Match"…
0
votes
1 answer

How to cache a file in CloudFlare, but not in browsers? I tried “Cache Everything”. I tried “Cloudflare-CDN-Cache-Control”

I have an SPA where all the files on my domain are static. I'm using CloudFlare to cache them to reduce load on my server. My goal would be to have CloudFlare cache all my files until my deploy script tells it a file changed. And client browsers…
dumbmatter
  • 9,351
  • 7
  • 41
  • 80
0
votes
0 answers

Setting no-cache after a cache has occurred?

I recently got some errors due to the browser reusing some cached js bundles. Initially, the response serving the bundles did not have any Cache-Control headers. After the error, I added them but unfortunately, the issue persisted. Question: Would…
Martin
  • 1,159
  • 10
  • 34
0
votes
1 answer

Rail API - Disable cached response

I have a Rails 6 API-only application and I'm using Nginx and passenger. When I try to do GET or POST in the Postman application or other places, I get only cached responses. For instance, if I try to get user 1, movies, I'll get the correct ones,…
Rubioli
  • 670
  • 6
  • 21
0
votes
1 answer

Output Caching using IIS (Unable to change to No Cache)

Good day everyone, I am currently having some issues with disabling my cache control to no-cache. I have tried the configuring the output cache through the IIS Manager by specifying the File Name Extensions and I am not sure on how to use it…
Jed
  • 31
  • 1
  • 8
0
votes
1 answer

Avoid image caching in browser in React

I have a code where the user's avatar is fetched from the backend. Now, the avatar file name is the same every time, even if a user uploads a new one because the backend replaces the old avatar with the new one with the same name. Since this was…
tuhindas
  • 11
  • 4