Allow specify custom theme version to solve browser cache issues
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
When modifying custom themes between app releases, browser cache prevent loading the latest version which could mess a lot the vaadin app.
Same thing for widgetset generated JS if the app embed modified custom widgets.
To solve this we should be able to programmatically setup application version and/or theme version so that vaadinBootstrap.js tells the browser to download the latest versions.
For example for theme:
You could replace line 233 in vaadinBootstrap.js:
loadTheme(themeUri, versionInfo && versionInfo['vaadinVersion']);
with
if (versionInfo && versionInfo['themeVersion'])
loadTheme(themeUri, versionInfo['themeVersion']);
else
loadTheme(themeUri, versionInfo && versionInfo['vaadinVersion']);
And allow to programmatically set themeVersion somewhere (SystemVersionsProvider like SystemMessagesProvider ?)
For widgetset we could use applicationVersion within versionInfo object.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with vaadinBootstrap.js around the loadTheme call and trace how the versionInfo object is produced. Then inspect SystemVersionsProvider and SystemMessagesProvider for the proposed configuration pattern; done means custom theme and application/widgetset versions can be supplied and used for cache-busting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100