No version queries on asset links
This page is for designers who are used to "cache busting" with style.css?v=3. In Exponential designs this is not
done, and not needed.
Contents
The rule
Do not add ?v=, ?ver=, a date or a hash as a query string to <link> or <script> URLs in templates, and do not
propose it in reviews. This is a project rule for every design.
How new files reach browsers
Stylesheets and scripts go through the packer, which names each packed file after the list of its sources and the
newest modification time of those sources (ezjscore.ini [Packer] AppendLastModifiedTime=enabled). Edit a file
and the next page links a file with a different name. Browsers have never seen it, so they fetch it. See
The packer.
Images and fonts referenced from CSS are fetched by URL as well; give a replaced image a new file name when it must change at once.
Why not add a query anyway
- It duplicates what the packer already does, and goes stale when someone forgets to raise it.
- Hand-written links with queries bypass the packer and the design cascade.
- Some caches and proxies treat URLs with queries differently.
A browser still shows the old file
- Check that the page links the new packed file (view the source). If it links the old one, a cached template still
holds the link: clear
template-block(andcontentfor full views); see The packer cache and deploys. - If the link is new but the style is old, hard-reload the browser.
- On sites with a service worker (the media design registers one), the worker may serve an older page; reload twice or clear site data in the browser's developer tools.
Related pages
- The packer
- Loading stylesheets
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.