-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve assets cache #8117
Comments
Simply drop the cache header (or perhaps Even force no caching) |
This is a built in feature on all browsers, disable-caching of assets. I suggest to add documentation that the developer needs to disable the cache in the browser. |
Disabling browser cache can be done easily via http cache headers |
Unfortunately, not @sigdestad Browsers are "smart" and like to cache anyway. https://blog.chromium.org/2017/01/reload-reloaded-faster-and-leaner-page_26.html I am also not sure developers will be happy to see noticeable performance drop for page loading (not cached .js and .css files must be always parsed and executed). Even when development mode tis turned on "because it is always turned on on developer's machine". It is certainly a trade-off: one bad experience against another bad experience. None of frameworks I know change
|
To see how work in production, the developer can simply run XP without dev mode :-) |
But I don't see how it is better than toggle checkbox in the browser. IMO toggle checkbox in browser is simpler as developer does not need to stop XP instance, change mode and start instance again. |
To sum up
Better to document dev mode in our reference and mention browser checkbox there enonic/doc-xp#148 |
Hmm... Are you saying devs are familiar with disabling cache? I never heard about this before now? |
Hard refreshing is one of the first thing i teach to new developers. |
In follow up task #8612 |
When XP is running in dev mode assetUrl should not be cached. Related issue: https://discuss.enonic.com/t/asseturl-should-not-generate-cache-headers-when-in-dev-mode/2209/7
in prod mode only assets with correct fingerprint and path should be cached
The text was updated successfully, but these errors were encountered: