Uh oh!
There was an error while loading. Please reload this page.
Bust the assets cache on modification. - #309
Conversation
rmarren1
commented
Jul 31, 2018
I like this, annoying to always have dev tools open and the cache probably trips up beginners. |
chriddyp
left a comment
There was a problem hiding this comment.
While this will work when developing locally, assets will still be cached by the browser when the user deploys the app. The use case I'm imagining is:
- Developer deploys their app
- Person A visits their app
- Developer changes CSS, deploys again
- Person A visits again - the CSS is cached from when they visited the app before the previous deploy.
The developer won't see an issue because they got the new version when they were developing, so they might not even know that their visitors will have an issue.
So, I think we should append a time modified query string or some other solution
090e0fd to
35a4bb0CompareT4rk1n
commented
Jul 31, 2018
@chriddyp I changed this PR to use time modified query string. |
chriddyp
left a comment
There was a problem hiding this comment.
Awesome, thanks for updating this! Once this is released, could you update https://github.com/plotly/dash-docs/blob/master/tutorial/external_css_and_js.py#L160-L163?
T4rk1n
commented
Jul 31, 2018
chriddyp
commented
Aug 10, 2018
@T4rk1n - Could we get this one merged and released? |
T4rk1n
commented
Aug 10, 2018
@chriddyp |
chriddyp
commented
Aug 10, 2018
OK. Why? It seems to complicate things to have two different ways that caches are invalidated in local vs deployed. Also, we don't have the config abstraction around local vs production yet. |
T4rk1n
commented
Aug 10, 2018
That is also my feeling, I'll merge & release. |
35a4bb0 to
67f8601Compare
Append time modified as query string to assets urls to trick the cache to refresh the file.
cc @plotly/dash
Resolves#303