Home > Article > Backend Development > Alternative method to block browser cache_PHP tutorial
Sometimes we don't want the browser to use cache to speed up the display of web pages, especially those web pages with frequently updated content such as forums. It is said on the Internet that you can use the following method to block the cache, but I tried it to no avail.
One day I had a sudden idea and found a way to display the latest cache under any circumstances. The method of web content is described as follows:
Please change the link of the web page to:
http://xxx.yyy.zzz/page.php?rand=XXXXXXX
Where http://xxx.yyy.zzz/page.php is your web page, rand is a Qurey string that you will not use, and XXXXXXX is a random string.
In other words, as long as a random string is added to the URL of the link that will not affect the content of the web page, so that the URL of the web page is different every time, so that the browser does not use the cache This page already exists, so that the latest content is displayed every time.