Replies: 1 comment 2 replies
-
|
I like the It seems like this would be sent as a standard parameter right? As such, I would say that the existing ways of sendings parameters are already enough to fill that part:
Also given that, the existing options would allow you naming that cache parameter as you wish, it seems to me that So to sum up, I fully agree for the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For the preload extension to work as intended, the
Cache-Controlresponse header must explicitly allow the browser to cache responses. For example, if the response containsCache-Control: no-cache, then preloading essentially becomes redundant, whereas returningCache-Control: private, max-age=60tells the browser that it may cache the response for up to60seconds (added to the docs in #1741), which leads to the extension working as expected.There’s currently, however, no way for the server to know that this is a preload request. If a
HX-Preloadheader was sent with requests that originate from elements with thepreloadattribute then the server would be able to respond with the appropriateCache-Controlheaders.For even more control, it might make sense to add a
hx-cacheattribute that tells the server how long it would like to cache the response for.Of course it’s still up to the server whether to respect this value or not.
Any thoughts on whether this could add value and what approach might be most suitable @benpate @1cg @alexpetros?
Beta Was this translation helpful? Give feedback.
All reactions