How can we help you?

Find how to configure your CDN and how to use its features.

Purging your cache

Purging gives you the ability to remove cached content from the CDN edge nodes. Tinify CDN automatically caches all requested files for at least one month. There are scenarios where you want to remove the cached content, for example when you have refreshed certain files or have accidentally published a file that should not be public.

There are three methods for ensuring your users are getting the updated/new file.

  1. Purge everything
  2. Custom purge
  3. Ensuring file name uniqueness (best practice)

Please note that for methods 1 and 2 the process can take a few hours to propagate through the network.

Purge everything

This method clears all cached objects from the CDN caches. Keep in mind that this will result in a large increase in your website traffic because the content needs to be pulled from your website.

Instructions on how to purge everything

  1. Go to your Tinify CDN dashboard page at https://tinify.com/dashboard/cdn
  2. Click or tap the three dots menu next to your CDN endpoint.
  3. Click or tap Purge cache.
  4. Select Everything and click or tap Purge
  5. A confirmation window will appear. Please read carefully and click or tap Confirm to initiate the process of purging your complete CDN cache.
  6. Your purge request has been sent and all cached objects will be removed from the CDN caches.

Custom purge

With this method, you can delete a select number of files from Tinify CDN. You will have to specify the complete path to the file on Tinify CDN.

In case you use query parameters (like resize options) you will need to include them in the file path. For example, if you have a generated thumbnail like:
https://xxxxxxxx.tinifycdn.com/panda.png?resize.width=100&resize.height=50&resize.method=fit
To purge this thumbnail you should include the parameters in the same order as when the thumbnail is generated:
/panda.png?resize.width=100&resize.height=50&resize.method=fit
Please note that a maximum of 200 paths can be submitted for purging within 24 hours.

Instructions on how to purge certain content

  1. Go to your Tinify CDN dashboard page at https://tinify.com/dashboard/cdn
  2. Click or tap the three dots menu next to your CDN endpoint.
  3. Click or tap Purge cache.
  4. Select the option Custom.
  5. A text field will appear. Please enter the file paths separated by a comma (,) or a new line. In case you use query parameters (like resize options) you will need to include them in the file path.
  6. Your purge request has been sent and all cached objects will be removed from the CDN caches.

Best practice: File name uniqueness

A best practice for working with web assets is to make file names unique. This way when you reference your new file, it will be fresh in the CDN cache and it will also bypass the browser cache of your end-users. The file name can be prepended by a short checksum of the file, but it can also be just a number.

For example instead of using

/logo.png

rename it to:

 /36c98e3.logo.png

Or

/logo-v2.png