Why PHP files have a cache, and only in Google
SingleLink.class.php
Class hero{
Private $id;
Private $name;
Private $nickname;
Private $next = null;
Public Function getId () {
return $this->id;
}
Public Function SetId ($id) {
$this->id = $id;
}
Public Function GetName () {
return $this->name;
}
Public Function SetName ($name) {
$this->name = $name;
}
Public Function Getnickname () {
return $this->nickname;
}
Public Function Setnickname ($nickname) {
$this->nickname = $nickname;
}
Public Function GetNext () {
return $this->next;
}
Public Function Setnext ($next) {
$this->next = $next;
}
function __construct ($id = "", $name = "", $nickname = "") {
$this->id = $id;
$this->name = $name;
$this->nickname = $nickname;
}
}
?>
test.php
Header ("Cache-control:no-cache, must-revalidate");
Require_once ' SingleLink.class.php ';
$head = new Hero ();
$hero = new Hero (1, "Song Jiang", "timely Rain");
echo $hero->getname ();
?>
The first run is not a cache, and the result is "Song Jiang". I put $hero = new Hero (1, "Song Jiang", "timely Rain"); Change to $hero = new Hero (1, "Song Jiang 222", "timely Rain"); The result of the operation is "Song Jiang". Network analysis is the Frome cache that is displayed. This is the result of Google's operation. IE is normal, the second run result is "Song Jiang 222".
Expert help analysis, why Chrome will appear this cache.
------Solution--------------------
If the cache is caused by PHP, then no matter what browser will have the cache
And you just appear cached on a particular browser, apparently with that browser setting
Of course, it doesn't rule out that he can't respond to your instructions to block caching