开发者

Different behaviour of browsers while caching the same file

I am trying to implement mod_disk_caching. I wrote a php code as shown in the example of the tutorial I was following.

I fired the following in the terminal

a2enmod cache
a2enmod disk_cache

/etc/init.d/apache2 force-reload

then in the php code 

<?php
header("Cache-Control: must-revalidate, max-age=3000");
header("Vary: Accept-Encoding");
echo time()."<br>";
?>

Now I tried running it using firefox.

In the first execution I got the following timestamp.

1308643975

Here, when I press refresh, the timestamp changes (as the file is reloaded from the server) and remains the same when I click the link again (as the file is retrieved from the cache).

Now I am trying the same with IExplorer.

As per my 开发者_开发问答understanding, the timestamp should be the same as the subsequent request for the file will be retrieved only from the cache. But I got a different timestamp.

Can anyone explain me the reason for this? Why is it giving separate timestamps when the browsers are different?


try to add more headers: "Expires", "Pragma",

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜