Skip to content
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

Add a cache buster for PWA upgrades #445

Closed
daonb opened this issue Dec 7, 2023 · 0 comments · Fixed by #451
Closed

Add a cache buster for PWA upgrades #445

daonb opened this issue Dec 7, 2023 · 0 comments · Fixed by #451
Assignees
Labels
good first issue Good for newcomers

Comments

@daonb
Copy link
Contributor

daonb commented Dec 7, 2023

Describe the bug
When updating the PWA version, the clients don't download a new version of the code

Additional context
The css and js files aready have a random part to their name., the problem is index.html which needs to be cached only for an hour.

A cache buster is a technique used in web development that allows changes to end user's web browser cache for specific web resources. When a website makes changes or updates its content, the cache buster helps to prevent the browser from serving cached, outdated versions of the site to users who have recently visited. This is usually achieved by adding a unique parameter to the URL of the resource, forcing the browser to download the new content.

For example, for a stylesheet named "styles.css", a cache buster could append it with a version number or timestamp: "styles.css?v=2" or "styles.css?t=123456789". When the browser sees this new URL, it treats it as a new resource and downloads it, bypassing the cache.

@daonb daonb added the good first issue Good for newcomers label Dec 7, 2023
@shech2 shech2 linked a pull request Dec 21, 2023 that will close this issue
@shech2 shech2 closed this as completed Dec 23, 2023
@shech2 shech2 reopened this Dec 23, 2023
daonb pushed a commit that referenced this issue Dec 28, 2023
daonb pushed a commit to daonb/terminal7 that referenced this issue Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants