Skip to main content
Filter by
Sorted by
Tagged with
746 votes
9 answers
560k views

The header Cache-Control: max-age=0 implies that the content is considered stale (and must be re-fetched) immediately, which is in effect the same thing as Cache-Control: no-cache.
rubyruy's user avatar
  • 7,962
242 votes
6 answers
204k views

From the RFC 2616 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1 no-cache If the no-cache directive does not specify a field-name, then a cache MUST NOT use the response to ...
Luke Puplett's user avatar
  • 45.9k
233 votes
5 answers
225k views

I'm using the Google "Page Speed" plug-in for Firefox to access my web site. Some of the components on my page is indicated as HTTP status: 200 200 (cache) 304 By Google's "Page Speed". What I'm ...
Hank's user avatar
  • 2,371
232 votes
7 answers
89k views

What’s the difference between Expires and Cache-Control headers?
whiterose's user avatar
  • 4,781
181 votes
19 answers
9k views

Question Part A ▉ (100 bountys, awarded) Main question was how to make this site, load faster. First we needed to read these waterfalls. Thanks all for your suggestions on the waterfall readout ...
Sam's user avatar
  • 15.6k
174 votes
4 answers
154k views

When I visit chesseng.herokuapp.com I get a response header that looks like Cache-Control:private Connection:keep-alive Content-Encoding:gzip Content-Type:text/css Date:Tue, 16 Oct 2012 06:37:53 GMT ...
user782220's user avatar
  • 11.3k
159 votes
1 answer
74k views

Can you please describe an example indicating difference between Public and Private Cache-Control in asp.net applications hosted in IIS. I read in MSDN that the difference is the following: Public: ...
ppolyzos's user avatar
  • 7,159
158 votes
7 answers
346k views

Whenever I update CSS, JS, or image files the browser is loading the same old files stored in cache. How can I prevent this? I am serving my site pages with PHP.
ArrayOutOfBound's user avatar
150 votes
8 answers
165k views

We're currently working on a new project with regular updates that's being used daily by one of our clients. This project is being developed using angular 2 and we're facing cache issues, that is our ...
Rikku121's user avatar
  • 2,662
142 votes
2 answers
6k views

I'm trying to use http caching. In my controller I'm setting a response as follows: $response->setPublic(); $response->setMaxAge(120); $response->setSharedMaxAge(120); $response->...
Jakub Zalas's user avatar
  • 36.3k
111 votes
10 answers
49k views

The short version of this issue is we are seeing the typical CORS error (x has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.) however we ...
Chris Pearce's user avatar
  • 1,926
109 votes
3 answers
79k views

I'm using Amazon S3 to serve static assets for my website. I want to have browsers cache these assets for as long as possible. What meta-data headers should I include with my assets Cache-Control: ...
Casey Flynn's user avatar
  • 14.1k
95 votes
2 answers
57k views

Expressjs automatically send etags. I would like to know how the etag is generated..is it based on the content that is generated dynamically by the get routine. or is there way I can mainpulate it, by ...
coool's user avatar
  • 8,377
77 votes
3 answers
111k views

I have a couple of queries related to Cache-Control. If I specify Cache-Control max-age=3600, must-revalidate for a static html/js/images/css file, with Last Modified Header defined in HTTP header: ...
nyb's user avatar
  • 771
70 votes
8 answers
88k views

Background: IIS 7 AspNet 3.5 web app Chrome dev tools lists 98 requests for the home page of the web app (aspx + js + css + images). In following requests, status code is 200 for css/images files. No ...
Francois's user avatar
  • 11k
56 votes
3 answers
28k views

I'm hosting an SPA on firebase where almost all paths get rewritten to index.html. I'm using webpack hash based cache busting, so I want to always prevent caching of my index.html but not any other ...
zevdg's user avatar
  • 1,151
56 votes
6 answers
37k views

I have these headers being sent to the client by the server: Cache-Control:private Connection:keep-alive Content-Encoding:gzip Content-Type:text/html Date:Sun, 27 Nov 2011 11:10:38 GMT ETag:"12341234"...
Asken's user avatar
  • 8,147
53 votes
2 answers
28k views

If a HTTP response that returns both Expires and max-age indications which one is used? Cache-Control: max-age=3600 Expires: Tue, 15 May 2008 07:19:00 GMT Considering that each one refers to a ...
vtortola's user avatar
  • 36.1k
51 votes
6 answers
50k views

Due to a misconfiguration of our webserver the main domain sent a 302 redirect to a new location. We fixed that issue. When emptying the browser cache everything works fine now. For the "normal" ...
Ole Albers's user avatar
  • 9,397
50 votes
10 answers
112k views

I created an app with vue-cli and then I build the dist folder for production. The app is deployed on IIS with flask backend and works fine. The problem occurs when I have to make some changes and I ...
nickb84's user avatar
  • 651
45 votes
5 answers
36k views

I have Amazon S3 objects, and for each object, I have set Cache-Control: public, max-age=3600000 That is roughly 41 days. And I have Amazon CloudFront Distribution set with Minimum TTL also with ...
Akash Kava's user avatar
  • 40.1k
44 votes
2 answers
41k views

The Cache-Control HTTP/1.1 header can specify max-age as well as whether the cache content can be public or private, indicating whether intermediate cache can cache the content. For example, Ruby on ...
nonopolarity's user avatar
44 votes
2 answers
31k views

I've got a resource in my Nginx that is configured like this: location ~ foo\.js$ { add_header Cache-Control public; expires 1d; } If I open this with Firebug and look at the headers it shows ...
Peter Bengtsson's user avatar
43 votes
2 answers
51k views

The cache control header "no-cache, must-revalidate, private" allows browsers to cache the resource but forces a revalidate with conditional requests. This works as expected in FF, Safari, and Chrome. ...
alienhard's user avatar
  • 14.8k
42 votes
9 answers
35k views

I'm using Azure Storage to serve up static file blobs but I'd like to add a Cache-Control and Expires header to the files/blobs when served up to reduce bandwidth costs. Application like CloudXplorer ...
Gavin's user avatar
  • 5,901
37 votes
3 answers
20k views

Assume browser default settings, and content is sent without expires headers. user visits website, browser caches images etc. user does not close browser, or refresh page. user continues to surf ...
Michael McCracken's user avatar
36 votes
4 answers
88k views

We are moving a site from one CMS to another. The .htaccess file has been changed and it needs to be refreshed for the new site to work right. From what I understand the .htaccess file will only be ...
Johann Dyck's user avatar
35 votes
1 answer
13k views

I know this is a simple question, and I am sure that no body will mark this as duplicate question, because I have searched all over the SO. so my question is what is the difference between max-age and ...
droidev's user avatar
  • 7,408
34 votes
4 answers
129k views

I have a problem with an Angular application that I update very often. I would like to avoid the browser cache and I am trying several alternatives but none of them work. The first thing is that I ...
Ulises 2010's user avatar
34 votes
10 answers
31k views

i'm issuing a request using MSXML's XmlHttpRequest object: IXMLHttpRequest http = new XmlHttpRequest(); http.open("GET", "http://www.bankofcanada.ca/stat/fx-xml.xml", False, "", ""); http.send(); And ...
Ian Boyd's user avatar
  • 259k
33 votes
3 answers
61k views

I am trying to make sure that a certain page is never cached, and never shown when the user clicks the back button. This very highly rated answer (currently 1068 upvotes) says to use: Response....
JK.'s user avatar
  • 21.6k
32 votes
8 answers
60k views

How can I add Cache-Control HTTP header in Spring Boot for static resources? Tried using a filter-component in the application, which writes headers correctly, but Cache-Control header gets ...
MatteKarla's user avatar
  • 2,747
30 votes
4 answers
96k views

How do you add an Expires or a Cache-Control header in JSP? I want to add a far-future expiration date in an include page for my static components such as images, CSS and JavaScript files.
Sam's user avatar
  • 1,095
29 votes
4 answers
45k views

I have a amazon cloudfront distribution that creates a 'origin' to my CDN. In my behavior, I set the Max TTL, Min TTL and default TTL. But my response header does't return the Cache-control header in ...
Igor Corradi's user avatar
28 votes
2 answers
12k views

We have configured nginx server to add cache control header to public and expiration time to 1 month. But when we make a request from browser, client is adding Cache-Control: no-cache header. Because ...
Rajeev's user avatar
  • 5,074
28 votes
2 answers
6k views

While I was testing a weird behaviour in cache handling with Chrome (I asked something about it here), I found something else: Chrome dev tool shows a 200 status code when the server returns a 304 ...
Nathanaël Spriet's user avatar
24 votes
4 answers
68k views

I'ld like to present always the latest website content to the user but also have it fast loaded. By researching I came across postings people suggesting to use the cache for speeding up loading. So ...
Uli's user avatar
  • 2,691
24 votes
6 answers
21k views

I'm running a single page app on IIS and using i18next library for translations in my app. The problem is that sometimes when I add new keywords to my translation.json file and hit refresh, the ...
JZ555's user avatar
  • 637
24 votes
2 answers
7k views

I've read that Firefox has begun supporting a cache control extension value of immutable, which means that "the response body will not change over time." So even if a user requests a "...
Brad Parks's user avatar
  • 73.4k
24 votes
2 answers
17k views

I'm trying to set a reasonable cache expiry for my JS files while in development. I have the standard setup, where HTML, CSS and JS are living under the static directory. The docs do mention this, ...
markdsievers's user avatar
  • 7,307
23 votes
3 answers
20k views

As of recent safari 5 was released, and it turns out to cause some problems for my website. I have a dynamic website running classic ASP (though that shouldn't matter much) and the site has some ...
Alxandr's user avatar
  • 12.4k
22 votes
2 answers
26k views

I would like .htaccess to perform the following code ONLY if http_referer is from google (.com/ .ru/ .co.uk /.co.in/ etc.). Is this possible? <filesMatch ".(jpg|jpeg|png|gif)$"> ...
GameDevGuru's user avatar
  • 1,135
22 votes
4 answers
70k views

Is there a way to force a client's cache to reload an HTML file if you can't change the URI referencing that file (e.g., can't add a timestamp param)? Here's my situation: A plugin deployed to a 1000 ...
Kyle Cureau's user avatar
  • 19.5k
21 votes
2 answers
24k views

We have recently fixed a nagging error on our website similar to the one described in How to stop javascript injection from vodafone proxy? - basically, the Vodafone mobile network was vandalizing our ...
Carson63000's user avatar
  • 4,223
20 votes
6 answers
35k views

I'm trying to download (and hopefully cache) a dynamically loaded image in PHP. Here are the headers sent and received: Request: GET /url:resource/Pomegranate/resources/images/logo.png HTTP/1.1 Host:...
Mehran's user avatar
  • 17.2k
20 votes
2 answers
23k views

We have a Webforms project with url routing. I have defined exception routes for images and css-files as routes.Add("IgnoreImages", new Route("img/{*pathInfo}", new StopRoutingHandler())); routes.Add(...
Mathias Rönnlund's user avatar
20 votes
1 answer
25k views

I'm trying to cache the response of http calls done by Retrofit(v 1.9.0) with OkHttp(2.3.0). It always made the network calls if I try to make a call without internet then java.net....
ImMathan's user avatar
  • 5,061
19 votes
2 answers
17k views

I have a nginx proxy to a API server. The API sometimes sets the cache control header. If the API hasnt set the cache control I want nginx to override it. How do I do that? I think I want to do ...
Stephen's user avatar
  • 4,346
19 votes
5 answers
38k views

I am building an ASP.NET/Umbraco powered website which is very custom data driven via entity framework, we are having to cache quite a lot of the data queries (For example searches by keyword) as it'...
YodasMyDad's user avatar
  • 9,545
18 votes
3 answers
29k views

Given the sample location example below, what does -1 mean for expires? Does that mean "never expires" or "never caches"? # cache.appcache, your document html and data location ~* \...
Redacted's user avatar
  • 974

1
2 3 4 5
29