Purging PageSpeed

PageSpeed as a rule will maintain its own cache contents, updating the entries as necessary. As with any cache, it isn't recommended to manually clear the cache - as it will reduce its effectiveness.

However, if you need to instantly clear the cache, it can be performed very easily on a per-domain basis and per web-server basis.


  • It is possible to purge the entire cache, or to purge one URL at a time
  • It is not possible to purge by regular expression or wildcard
  • All URLs used for purging must be http - PageSpeed does not use the https scheme for purging

Purge single URL

Eg. For the single file www.example.com/style.css on web1

curl -X PURGE -H "Host: www.example.com" http://web1.i/style.css 
Purge successful

Purge entire cache

Eg. For the entire www.example.com domain on web1

curl -X PURGE -H "Host: www.example.com" http://web1.i/* 
Purge successful

Multi web server

In a multi web server stack, you should change the domain name to whichever back end you want to target. In the examples above, web1 can be interchanged with web2, web3 etc.