You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently route partials for the mpa mode just get named based on their route, which as a name won't change from build to build.
constoutputPath=`${outputDir}/_routes${url}`
public/
_routes/
about/index.html
index.html
But, the content does and so to avoid any issues with caching, and just like with CSS / JS, we should hash these filenames based on content to be self cache busting by default.
Details
The main obstacle here is that all the content needs to be known up front because the generated routes have to include entries for all pages. Since currently this happens page by page in serialize.js, there is no guarantee of order, it's all happening in parallel.
thescientist13
changed the title
route partial filenames should include a hash based on content
route partial filenames should be hashed based on file contents
Apr 11, 2021
Type of Change
Summary
Currently route partials for the
mpa
mode just get named based on their route, which as a name won't change from build to build.But, the content does and so to avoid any issues with caching, and just like with CSS / JS, we should hash these filenames based on content to be self cache busting by default.
Details
The main obstacle here is that all the content needs to be known up front because the generated routes have to include entries for all pages. Since currently this happens page by page in serialize.js, there is no guarantee of order, it's all happening in parallel.
Saved a WIP branch here.
The text was updated successfully, but these errors were encountered: