Quantcast
Channel: Webmaster Tools » caching
Viewing all articles
Browse latest Browse all 2

Stop Browser Caching of your Website

$
0
0

Browsers like Google Chrome are terrible for caching. It's highly annoying as a web developer to make changes and you don't know if they worked or not, because it may not even be loading your page, but a previous cached version of the page. I've wracked my brain for hours before trying to figure out why code doesn't work, then realize the stupid browser was caching my page!

Here's how to avoid and stop caching of your browser permanently! Use both PHP and HTML at the top of each page:

<?php header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); ?>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

Enjoy!


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images