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
{{ message }}
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
... for most requests (.html, .css, .js, etc.) and we send a ...
cache-control: max-age=31622400,immutable
... for the content addressed /hlx_ images etc.
i think that both of those are at least somewhat problematic.
first, it is way too hard to get .css and .js out of mobile device browser caches as a refresh in the browser only reloads the html, so instructing to be cached for 7 days is too long and i would instead suggest no-cache or a very short max-age.
ideally, we would be able to more easily allow a content addressed reference for .js and .css and i think we had some solution earlier. i think that would be relevant primarily for references from head.html but possibly also from html blocks in .md.
i also wonder if we could just make everything that has a longer sequence of hex in the url be considered immutable, so we don't have to special case hlx_.
The text was updated successfully, but these errors were encountered:
As for the css/js content addressed stuff, we used to have it in hlx-cli, where it computed the assets during packaging. for helix-pages, this would be useless as we load the resources dynamically.
I thought that we already have some magic with the js/css in the pipeline and in helix-static?
like the pipeline creates a esi include that gets replaced by in helix-static with a content-hashed version?
I thought that we already have some magic with the js/css in the pipeline and in helix-static?
like the pipeline creates a esi include that gets replaced by in helix-static with a content-hashed version?
We do have the magic in the pipeline, but in the helix-pages case, the header.html that contains the references is being served by helix-static, which does not do rewriting for HTML, only for CSS and JS.
currently we send a ...
... for most requests (
.html
,.css
,.js
, etc.) and we send a ...... for the content addressed
/hlx_
images etc.i think that both of those are at least somewhat problematic.
first, it is way too hard to get
.css
and.js
out of mobile device browser caches as a refresh in the browser only reloads the html, so instructing to be cached for 7 days is too long and i would instead suggestno-cache
or a very shortmax-age
.on the second one, it turns out that there is very spotty browser support for
immutable
...https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Browser_compatibility
... however, i think in combination with the
max-age
of a year we should be in good shape here.ideally, we would be able to more easily allow a content addressed reference for
.js
and.css
and i think we had some solution earlier. i think that would be relevant primarily for references fromhead.html
but possibly also from html blocks in.md
.ideally i would love something like...
... that would get rewritten to ....
i also wonder if we could just make everything that has a longer sequence of hex in the url be considered immutable, so we don't have to special case
hlx_
.The text was updated successfully, but these errors were encountered: