Eliminate the need to send HTTP requests in many cases, and eliminate the need to send full HTTP responses in other cases, by storing web content closer to where it is consumed.
Questions tagged [http-caching]
529 questions
187
votes
9 answers
Is it possible to cache POST methods in HTTP?
With very simple caching semantics: if the parameters are the same (and the URL is the same, of course), then it's a hit. Is that possible? Recommended?

flybywire
- 261,858
- 191
- 397
- 503
142
votes
2 answers
Is it fine if first response is private with AppCache (Symfony2)?
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->setLastModified($lastModifiedAt);
dev mode
In dev environment first…

Jakub Zalas
- 35,761
- 9
- 93
- 125
83
votes
4 answers
What is the difference between no-cache and no-store in Cache-control?
I don't find get the practical difference between Cache-Control:no-store and Cache-Control:no-cache.
As far as I know, no-store means that no cache device is allowed to cache that response. In the other hand, no-cache means that no cache device is…

vtortola
- 34,709
- 29
- 161
- 263
78
votes
7 answers
Prevent IE11 caching GET call in Angular 2
I have a rest endpoint that returns a list on a GET call. I also have a POST endpoint to add new items and a DELETE to remove them. This works in Firefox and Chrome, and the POST and DELETE work in IE11. However, the GET in IE11 only works on…

cmaynard
- 2,852
- 2
- 24
- 34
65
votes
4 answers
How to use caching in ASP.NET Web API?
I am using ASP.NET MVC 4 with WEB API
I have the following action, in the action shown below, my service method makes a db call to DoMagic() method and returns an integer value which I am then using on every page, this action is called using an ajax…

Yasser Shaikh
- 46,934
- 46
- 204
- 281
58
votes
4 answers
Setting HTTP cache control headers in Web API
What's the best way to set cache control headers for public caching servers in WebAPI?
I'm not interested in OutputCache control on my server, I'm looking to control caching at the CDN side and beyond (I have individual API calls where the…
user32826
51
votes
5 answers
Output caching for an ApiController (MVC4 Web API)
I'm trying to cache the output of an ApiController method in Web API.
Here's the controller code:
public class TestController : ApiController
{
[OutputCache(Duration = 10, VaryByParam = "none", Location = OutputCacheLocation.Any)]
public…

Samu Lang
- 2,261
- 2
- 16
- 32
49
votes
2 answers
Expires vs max-age, which one takes priority if both are declared in a HTTP response?
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 different point in time.

vtortola
- 34,709
- 29
- 161
- 263
46
votes
5 answers
Why does Chrome spend time "downloading" content from cache?
I am serving static content intended to be cached by the browser indefinitely. Chrome is caching it as expected, but is still spending time "downloading" it. I am using Chrome 46.0.2490.71.
As you can see, the content is being served from cache,…

dlras2
- 8,416
- 7
- 51
- 90
30
votes
3 answers
Jekyll Bootstrap based blog - Expire headers?
I have a Jekyll bootstrap based blog hosted on Github pages.
My problem is: Every time I change something on my web page, I have to forcefully reload the page (CTRL + R) to see the changes.
Jekyll or my browser does not seem to realize that there is…

Sebastian Hoitz
- 9,343
- 13
- 61
- 77
21
votes
1 answer
What are the options for the gzip_proxied directive for?
The gzip_proxied directive allows for the following options (non-exhaustive):
expired
enables compression if a response header includes the “Expires” field with a value that disables caching;
no-cache
enables compression if a response header…

George Reith
- 13,132
- 18
- 79
- 148
20
votes
1 answer
HTTP: Combining expiration and validation caching
I'm having trouble formulating HTTP cache headers for the following situation.
Our server has large data that changes perhaps a couple times a week. I want browsers to cache this data. Additionally, I want to minimize latency from conditional gets…

roufamatic
- 18,187
- 7
- 57
- 86
19
votes
3 answers
Cache-Control headers not sent in response despite being configured on response object
I'm trying to set cache headers in ASP.NET MVC Web API, but the response from IIS suggests that the CacheControl values set are being ignored.
My original assumption was that I was using the EnableCorsAttribute in System.Web.Http.Cors, which is…

gbro3n
- 6,729
- 9
- 59
- 100
19
votes
2 answers
HTTP Caching with Authorization
Given a response from a web server that contains an Authorization header as per the OAuth spec does HTTP caching fail to be useful?
Request1 Authorization : AUTHTOKEN
Request2 Authorization : ANOTHERAUTOTOKEN
In this case given HTTP caching the…

Finglas
- 15,518
- 10
- 56
- 89
17
votes
3 answers
How to use CXF, JAX-RS and HTTP Caching
The CXF documentation mentions caching as Advanced HTTP:
CXF JAXRS provides support for a number of advanced HTTP features by handling If-Match, If-Modified-Since and ETags headers. JAXRS Request context object can be used to check the…

sfussenegger
- 35,575
- 15
- 95
- 119