I have created a web-based (web.layout) dashboard but I have been facing an annoying issue.
Whenever I update any CSS values, they don't apply, despite performing these steps:
- restarting Odoo (from CLI: sudo systemctl restart odoo)
- upgrading my module
- regenerating assets (debug mode>regenerate assets)
- clearing the browser cache (ctrl-shift-r, and even from devTools>applications>clear site data)
- deleting all web assets (in postgres: delete from ir_attachment where url like '/web/assets/%')
When I run it from a private/incognito window, all the changes appear correctly, but not from my regular browser window.
Alternatively, if I rename template files or suffix some dummy query to images (eg: image.png?123) it updates.
Are there any other steps I could take to resolve this issue?
Hi Kunjan. Thanks for your prompt reply, as always.
I tried your suggestion in the dev tools console, but it returned getRegistrations undefined.
Nevertheless, I seem to have solved the issue by calling the dashboard with ?debug=assets whenever I make any CSS changes, and it seems to work quite well. Do you find any problem with calling it frequently?
Hello Sofia,
Likely cause: HTTP instead of HTTPS (service workers require HTTPS).
Check in console: navigator.serviceWorker
If undefined → your browser/connection doesn't support it. Use ?debug=assets instead — it works.
No problem. Use it freely during development