Msg#: 4417242 posted 5:44 am on Feb 14, 2012 (gmt 0)
Is it possible to set different headers for CDN and for my end user? I use origin pull for my CDN and it honors the caching headers that I set.
So, if i put, max-age header to two days, my CDN will cache the page for two days.
I use header("Cache-Control: maxage=172800, public") in my PHP code.
But I guess the browser of my site visitor will also cache the page for two days and will not send a new request on second or further requests to the page. Is it possible not to set headers for the browser, but for the CDN?
Msg#: 4417242 posted 4:08 am on Mar 30, 2012 (gmt 0)
The browser gets the Cache-Control header from the CDN.
In fact, the CDN forwards the cache headers set by my website.
Webserver => CDN => User
I want to set the header for CDN to cache content for 2 days, but the User should see the cache header set for 10 minutes. The reason is, I can manually purge the cache from the CDN whenever I update the content.
Cache directives MUST be passed through by a proxy or gateway application, regardless of their significance to that application, since the directives might be applicable to all recipients along the request/response chain. It is not possible to specify a cache- directive for a specific cache.
this means you won't fix this without a CDN-specific cache control header.