用于浏览器和CDN的不同Cache-Control

Is it possible to set different cache-control headers for CDN and browser? Currently, I am using

header("Cache-Control: max-age=3600, public");

Since, I am using public, I believe that both browser and the CDN are caching the page for 1 hour. I have origin pull set on the CDN, so that the CDN server will retrieve the page from the web host.

I want the clients cache for 10 minutes and CDN to cache for one hour. is that possible?

If that is not possible, I dont want the browsers to cache the content at all, but the CDN to once every hour.

It's possible, but it depends on the specific CDN. In general, CDNs will interpret the Cache-Control header in the same way. The CDN has a proprietary mechanism for cache control. For example, Akamai will read a proprietary HTTP header (X-Akamai-something) that takes precedence over standard cache headers.

It is possible to have different cache control setting for Browser and CDN. So there are two types of cache control setting:

1). Browser to Edge server cache control setting: this is usually done at Origin server and CDN usually respects that setting.
2). Edge server to Origin cache control setting: this is usually done at CDN layer. In addition, configuration can also be added at CDN layer to override that cache control setting from Origin server as in 1).

So in summary, you can have different cache control setting for Browser and CDN, you can also choose not to cache at Browser but only cache at CDN layer.