English 中文(简体)
浏览器和CDN的不同Cache-Control
原标题:Different Cache-Control for browser and CDN

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

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

由于我是公开的,我认为,浏览器和CDN都在打上1小时的网页。 我先从CDN上台,以便CDN服务器从网络主机上检索网页。

我想客座时间为10分钟,CDN需要一小时。 这是可能的。

如果无法做到这一点,我就想让浏览者把内容放在一边,而裁谈会则每小时一次。

问题回答

它是可能的,但取决于具体的裁谈会。 总的来说,国家计算机网络将以同样的方式解释Cache-Control头盔。 CNN拥有控制海滩的专有机制。 例如,Akamai将读成一个专有的吉大港游轮头(X-Akamai-something),高于标准骑士。

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

因此,简言之,你对Browser和CDN可以有不同的切身控制环境,你也可以选择不在Browser,而只选择在CDN层的海滩。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签