Static asset caching
Static assets for WordPress and Node.js environments are cached and served by VIP’s edge cache servers.
The actual default time to live (TTL) for the cached version of a static asset is:
- 15 days for enqueued JS and CSS files that are concatenated by VIP (identifiable by request paths that begin with
/_static/??
). - 1 year for media files that were uploaded to the VIP File System (located within
/wp-content/uploads
) - 1 year for static asset files that are deployed from the application’s wpcomvip GitHub repository and served by the web application server and have file extensions:
jp(e)g
,.gif
,.png
,.swf
,.css
,.js
,.manifest
,opensearch.xml
,.webm
,.webp
,.svg
,.ico
,.ieot
,.ttf
,.otf
,.woff2
The cache for a static asset file located within an environment’s deploying branch is automatically cleared upon a code deployment that includes an updated version of that file.
Browser caching
By default, the Cache-Control
HTTP header for static files is set to cache-control: max-age=31536000
(1 year). The value of this header (e.g. max-age
or s-maxage
) can be modified for static assets that are served by the origin application web server but not for files that are stored in the VIP File System.
Last updated: August 08, 2024