A Cache-Control response directive in the HTTP header
Questions tagged [no-cache]
93 questions
153
votes
13 answers
Why both no-cache and no-store should be used in HTTP response?
I'm told to prevent user-info leaking, only "no-cache" in response is not enough. "no-store" is also necessary.
Cache-Control: no-cache, no-store
After reading this spec http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, I'm still not quite…

Morgan Cheng
- 73,950
- 66
- 171
- 230
62
votes
2 answers
How long does Google Chrome cache a resource if expires and/or no-cache headers are not set?
We have been having a problem with Chrome caching a resource on our Glassfish server. The expires and no-cache headers are not being sent and the resource (an approximately 4 MB SWF file) is being cached by Chrome -- despite the presence of the…

sean
- 2,560
- 3
- 18
- 21
50
votes
4 answers
How to disable cache in Windows 10 on the Edge browser?
How to disable or delete browser cache in Windows 10 on the Edge browser?
There are no options on preferences and developer tools (F12)

sayingu
- 2,261
- 3
- 19
- 26
27
votes
3 answers
How to prevent Android from returning a cached response to my HTTP Request?
I'm writing a client that is making repeated http requests for xml data that is changing over time. It looks like the Android stack is caching my page requests and returning the same page repeatedly. How do I make sure it gets a fresh page each…

Gerry
- 1,838
- 5
- 24
- 32
21
votes
2 answers
Avoiding 301 redirect caching
This is a follow up question to Using 301/303/307 redirects for dynamic short urls, where I try to determine the best method for implementing short url redirection when the destination url will change on a frequent basis.
While it seems that 301 and…

Yarin
- 173,523
- 149
- 402
- 512
15
votes
2 answers
Laravel response Cache-Control headers always containing 'no-cache'
For some reason Laravel seems to be manipulating the response headers 'Cache-Control' on the very last moment. I want to make browser caching possible.
class TestController extends Controller
{
public function getTest()
{
$response…

Riesjart
- 151
- 1
- 1
- 4
13
votes
1 answer
nginx reverse proxy disable cache
i use nginx as a reverse proxy to connect a api. The problem is when i send a query after add or remove something. Nginx send me the old json value. I tried to disabled cache but it's not working.
my nginx config:
location / {
sendfile off;
…

Kévin Gaulin
- 131
- 1
- 1
- 4
12
votes
6 answers
Prevent cache in CloudFlare
I'm getting started with CloudFlare and I’m using it to build a new project.
I’m facing an issue when I make changes: I cannot see my changes in the browser, so I assume the problem here is the cache setting of CloudFlare.
I have read this link,…

Tomás Juárez
- 1,517
- 3
- 21
- 51
9
votes
1 answer
Google App Engine - headers[] and headers.add_header() for cache control
What is the proper way to set cache control?
Sometimes I see the use of headers[]
self.response.headers["Pragma"]="no-cache"
self.response.headers["Cache-Control"]="no-cache, no-store, must-revalidate, pre-check=0,…

user365918
- 131
- 1
- 2
7
votes
2 answers
Set response header in Spring Boot
How can I set the response header for each call in my application made with Spring Boot?
I would like to try to use a filter to intercept all the calls and be able to set the response header.
I followed the guide Disable browser caching HTML5, but…

Giampiero Poggi
- 389
- 1
- 4
- 13
6
votes
1 answer
Safari browser ignoring my no-cache
I'm unable to force a page to always expire in Safari. Chrome, IE and Firefox are good citizens but Safari is cruising along just fine with ignoring the following ASP.NET code:
// Expire immediately
Response.Expires =…

Keith Adler
- 20,880
- 28
- 119
- 189
5
votes
2 answers
How to cache an object on Varnish, but tell the client not the cache it
I am caching the product details page on Varnish, and then I purge the cache from the backend server whenever the product is updated. I want my clients to never cache this page on their side, but always ask from Varnish, so that I can serve them the…

fkoksal
- 315
- 4
- 11
5
votes
3 answers
Which are the optimum cache-related HTTP headers for a content that can change?
We have several files which are served through HTTP and which change from time to time.
Which are the HTTP headers, related to caching, that we should return in the HTTP response to optimize browser load speed while at the same time forcing the…

Óscar
- 650
- 1
- 4
- 16
4
votes
3 answers
Tomcat is setting no-cache for JS and CSS file
So frustrating. :P
Really would like these to be cached on users' browsers but it's setting this.
Cache-Control:no-store, no-cache,
must-revalidate, post-check=0,
pre-check=0
How do I stop this?
I've tried looking in our settings for anything…

bobber205
- 12,948
- 27
- 74
- 100
4
votes
1 answer
What will happen if Cache-Control have `no-cache` and `max-age=900`?
What'll happen if I set server response as:
Cache-Control: private,no-cache,max-age=900?
What'll happen if the header is like:
Cache-Control: public,no-cache,max-age=900?
Since it has a no-cache whether browser (Or proxy server) consider the…

Asim K T
- 16,864
- 10
- 77
- 99