question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: use frontend-package version in lovelace resource URI

See original GitHub issue

Category

  • 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.

  1. 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).
  2. If no resource is attached (either without version nor with the previous version), there is nothing TODO. If it is attached, remove it
  3. add the new resource with the new version in the URI

Alternatives

Nope.

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ludeeuscommented, Sep 13, 2020

image

1reaction
KTibowcommented, Aug 26, 2020

It already sends headers to use less caching, but I think this is a good idea, so Home Assistant loads faster.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found