cache-control Questions

5

I've been banging my head over this. I'm using NextJS 13's new App Router. I've tried setting the response Cache-Control header via middleware.ts but it doesn't change. I also tried in next.config....
Bedizen asked 11/5, 2023 at 13:38

2

Solved

does anyone know how to set up CloudFront Caching correctly? I've got a Jekyll website in S3 and CloudFront set up like this: Path Pattern: Default (*) Minimum TTL: 86400 Maximum TTL: 604800 Defa...

4

I am hoping someone can advise on the proper method for getting Varnish to send cache-control headers. Currently, my configuration is sending "Cache-Control: no-cache" to clients. Thanks in advan...
Dna asked 25/1, 2012 at 20:43

1

I am trying to set a static cacheControl on some fields, as done here From my understanding, I need to use a directive, so I used the following nest documentation to declare directives So, I built ...
Shaum asked 20/6, 2022 at 7:15

2

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 ...
Pleasure asked 9/4, 2021 at 7:54

2

Solved

I don't understand the must-understand directive of the HTTP Cache-Control header. What are some examples of when this would be used, and what sort of status code might a server use that a cache ma...
Dishonesty asked 18/10, 2023 at 17:56

5

Solved

Browser: Firefox 6.0 I've Page A with the following setup to make sure the content is NOT stored in the bfcache of the browser: 1) $(window).unload(function(){}); 2) Following HTTP headers: &...
Maddock asked 30/8, 2011 at 18:40

1

this is my htaccess cache-control policy: <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> <FilesMatch "\.(js|css|pdf|swf)$"&g...
Contrabassoon asked 26/8, 2016 at 10:27

0

I am struggling to understand the caching mechanism in Next.js app router. According to the documentation, Next.js is supposed to cache everything statically by default, but this doesn't seem to ap...
Brusque asked 6/7, 2023 at 14:7

5

I have set Cache control in my response header as Cache-Control:public, max-age=86400. But when I try to refresh page or open a new tab, it always hits my server. The response status I got is 200, ...
Monto asked 7/3, 2017 at 23:21

3

Solved

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 ...
Guano asked 18/6, 2015 at 17:7

2

Chrome devtools network tab shows "Transferred data over network" value of the same size of cached resource file. If I block the last request that appears on above image, picture isn't l...

1

The following code will always log the same message even if the module has changed on the server, regardless of Cache-Control headers sent: import('http://example.com/script.mjs').then(m => con...
Anhydrite asked 18/10, 2019 at 14:48

3

According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.10 clients must invalidate the cache associated with a URL after a POST, PUT, or DELETE request. Is it possible to instruc...
Vicariate asked 4/10, 2013 at 4:32

4

Solved

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...
Aisne asked 20/1, 2012 at 6:12

10

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 an...
Liberec asked 8/1, 2020 at 14:35

7

Solved

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.
Crisp asked 30/11, 2012 at 6:26

2

Solved

For the context, I'm creating presigned URL to upload to S3. For these requests the Cache-Control header has to be set to the value public, max-age=31536000, immutable. I do the fetch with this co...
Algid asked 27/5, 2020 at 11:3

6

Solved

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 t...
Nawrocki asked 9/8, 2013 at 14:19

3

Solved

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...

10

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...
Korikorie asked 28/6, 2017 at 10:51

9

Solved

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.
Bradshaw asked 26/6, 2009 at 1:34

2

Solved

There are several S.O. questions on this like: Rails ( set_no_cache method) Cannot disable browser caching in Safari and Opera How to prevent browser page caching in Rails But no mater what I d...
Cheerly asked 18/11, 2014 at 12:46

4

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 ...

2

Looking at the code in CacheInterceptor I see that response with the code 204 are not cached. Yet I believe 204 are cacheable as discussed here We use 204 as a response to GET don't indicate an em...
Braddy asked 28/6, 2017 at 14:41

© 2022 - 2025 — McMap. All rights reserved.