Why PHP files have a cache, and only in Google

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.