You can run this by doing the following:
- Log into https://prerender.io
- Open the developer console on the prerender site
- Copy the code in this gist and paste it into your console
- Hit enter!
Some notes:
- This script takes a while, Prerender is not very performant! So if you have a lot of cached URLs, be patient.
- I recommend opening the network tab of your developer console, and making sure that all the requests to
/cached-pages
andremove-cached-urls
are returning 200 OK responses. If they're returning any response with status400+
it's likely this script isn't working. - This may stop working at any time if Prerender changes their API or API usage policies ever.
Thanks a ton!
I had to run the script a couple of times. Prerender.io seems to automatically upgrade/downgrade your subscription plan based on how many pages are cached.
By removing enough of them, I fell to a lower rang which I think broke the execution of remove-cached-urls.
WARNING:
New subscription plans are now additionally charging caching and re-caching pages (2 $/ 1000 recaches) keep that in mind and think about if you really want to delete the cache
