Static asset caching
Static assets for WordPress and Node.js environments are cached and served by VIP’s edge cache servers.
Static assets include:
- Media files that were uploaded to the VIP File System (located within
/wp-content/uploads
) - Enqueued JS and CSS files that are concatenated by VIP (identifiable by request paths that begin with
/_static/??
) - All files that are served by the web application server (i.e. static assets that are deployed from the application’s wpcomvip GitHub repository) or by the VIP File System that have file extensions:
jp(e)g
,.gif
,.png
,.swf
,.css
,.js
,.manifest
,opensearch.xml
,.webm
,.webp
,.svg
,.ico
,.ieot
,.ttf
,.otf
,.woff2
Cache-control headers
By default, static files are cached with a Cache-Control
HTTP header set to cache-control: max-age=31536000
(1 year). If a Cache-Control
HTTP header is set to a s-maxage
response directive, the s-maxage
value will take precedence over max-age
.
- The value of
max-age
ors-maxage
can be modified in order to customize the duration of caching for static assets that are served by the origin application web server. - The
max-age
ands-maxage
header values cannot be modified for files that are stored in the VIP File System.
Last updated: September 13, 2023