This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
component updating only after clearing browser's cache #109
Comments
I couldn't find the reason for this issue but I solved it by adding a hash at the end of the call for each resource: var hash = Math.random().toString(36).substring(2, 8) // prevent caching
const components = {
'deck-button': httpVueLoader('components/DeckButton.vue?' + hash),
'deck-card': httpVueLoader('components/DeckCard.vue?' + hash),
} |
By the way its only a solution to tell chrome that file has changed! On client side! The other option change header of http Last-Modified! But is server side feature ! |
is there a clean solution than this @FranckFreiburger ? I've been running httpvueloader in production only just realized this is what I've had to ask users to do hard refreshes so often. |
I've gone with the following. Declare your app version somewhere:
And then in sfcLoaderOptions:
This will prevent cached versions from the being downloaded when you updated your build number. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, not sure if this is a http-vue-loader issue or something else, the thing is that
Only
deck-button
would update every time, but nodeck-card
, unless I clear the cache.I've tried everything:
httpVueLoader()
httpVueLoader.register()
httpVueLoader
http-server
http.server
.... nothing worked.
Anybody, any idea?
The text was updated successfully, but these errors were encountered: