Feature: use frontend-package version in lovelace resource URI
See original GitHub issueCategory
- Backend/Integration
Checklist
- This Feature Request only contain 1 request (if you have multiple open multiple feature requests).
The idea
To avoid browser cache issues between version upgrades of frontend packages, I’d like to propose the idea of using the release version of the package inside the resource URI.
That means, when updating “custom-foo-package” from version 1.11 to version 1.12, the URI for the lovelace resource changes from /hacsfiles/custom-foo-package/package.js?v=1.11
to /hacsfiles/custom-foo-package/package.js?v=1.12
.
Implementation
Not sure if it is possible to search in already added lovelace-resources, but I think so as I remember a notification inside the HACS UI which said that the Lovelace Resources is not loaded or sth. like that.
- As a BC one could search for the resource “without” the version inside the resource list and replace it with the new version (when updating, I would not suggest to apply this on every package already installed BUT during an update).
- If no resource is attached (either without version nor with the previous version), there is nothing TODO. If it is attached, remove it
- add the new resource with the new version in the URI
Alternatives
Nope.
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Adding resources to lovelace - Home Assistant OS
Hello, I have updated my hassio to version 0.107.4. Until this version it was possible to add resources like resources: type: js url: ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It already sends headers to use less caching, but I think this is a good idea, so Home Assistant loads faster.