Pixta Cloud

Document
Home/Expiration/

Expiration Timestamp (expires)

The expires parameter accepts a UNIX timestamp (expressed in absolute seconds) such as expires=1649316984, which translates to Thursday, April 7, 2022 7:36:24 AM UTC. This value specifies an expiration date after which the image URL should no longer be served.

When the image is requested, Pixta Cloud checks the expires timestamp against the current time. If the given expiration date is in the past, the image will not be served and a 410 status code will be returned. If the given expiration date is in the future, the image will be served with a Cache-Control header that displays the amount of time in seconds remaining until the image expires. For example, if the expires timestamp is one minute in the future, the image will be served with a Cache-Control: max-age=60 header.

We recommend that when using the expires parameter on your images, you also sign the images to prevent tampering with your expiration date. See our Securing Images documentation for more information on how to sign your images.