Questions tagged [no-cache]

A Cache-Control response directive in the HTTP header

85 questions
125
votes
11 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
  • 66,562
  • 63
  • 166
  • 223
51
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,340
  • 3
  • 16
  • 21
42
votes
2 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
  • 1,921
  • 3
  • 16
  • 24
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,662
  • 5
  • 22
  • 31
18
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
  • 144,097
  • 139
  • 361
  • 489
14
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
  • 141
  • 1
  • 1
  • 4
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
9
votes
7 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,389
  • 2
  • 16
  • 44
6
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…
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,230
  • 24
  • 116
  • 184
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
  • 175
  • 3
  • 9
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
  • 11,636
  • 25
  • 71
  • 97
4
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
  • 41
  • 1
  • 1
  • 3
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
  • 12,493
  • 9
  • 67
  • 85
4
votes
4 answers

Howto deactivate caching inside a jsp page

I understand there is a HTTP response header directive to disable page caching: Cache-Control:no-cache I can modify the header by "hand": <%response.addHeader("Cache-Control","no-cache");%> But is there a "nice" way to make the JSP interpreter…
Eduard Wirch
  • 9,361
  • 9
  • 58
  • 70
1
2 3 4 5 6