How to configure "cache-control" header when request remote imgs? #1766
Replies: 4 comments
-
|
How are you serving your site? You need to configure the headers on your hosting provider. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the quick reply! For now it's not deployed, I'm using However, I plan to deploy on Netlify when I finished dev. Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
|
Try deploying it directly. I don't think additional config will be required. You can configure the response headers (https://docs.netlify.com/routing/headers/); the request won't have any headers regarding cache control in prod. |
Beta Was this translation helpful? Give feedback.
-
|
On GitLab pages, nowadays it's a desire. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm using Backblaze + Cloudflare to host my images. When I'm using vitepress I found the images' response header
cf-cache-statusis alwaysMISS.I checked the request header and I found
cache-controlandpragmavalues are bothno-cache. When I imported the same request into Postman and modified bothcache-controlandpragmatomax-age=86400, the response headercf-cache-statusturned toHIT. I think the problem is here.Is there any method that I can configure the cache related request header of imgs?
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions