Purge a file by its URL

Modified on Tue, 05 Dec 2023 at 04:11 PM

From the dashboard

Please note that cache purging by URL will only affect the platform and CDN, but not your browser's cache. So, if we take the example of an image, purging the image URL will only purge the platform and CDN cache. If you also want to purge the browser cache, you should opt for a purge of static files or a total purge.

You can purge files by URL in the "Flush cache" pop-up window.

Select the "Purge files by URL" option, select at least one domain and confirm by clicking on "Flush".

From the API

To clear the cache of all or specific resources via the API, please contact our support team to obtain the API token. Make sure you also have the configuration ID, which you can find in the dashboard URL of your configuration. For example, if the URL is https://dashboard.fasterize.com/feo/projects/64/configuration/1, the configuration ID is 1.

Information for the full purge can be found on the API documentation.

curl -i -H 'Content-Type: application/json' -H "Authorization: $myApiToken" -X POST -d '{"urls" : ["https://www.domain.com/path/image.png?frz-v=2"
]}' https://api.fasterize.com/v2/configs/$config_id/cache/purge/urls

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article