Vaadin @Javascript : clear cache for updated JS file

萝らか妹 提交于 2019-12-01 05:41:30
David Blaney

I have overcome this by utilizing the resourceCacheTime parameter of the Vaadin servlet configuration:

@VaadinServletConfiguration(ui = MyUI.class, resourceCacheTime = 0)

Although it has its limitation as described in my answer to another question here.

This is browser feature to localy cache JS files, nothing to do with Vaadin.

As you figure it out yourself: If you want to make sure users have latest version of JS file, you should rename JS file name to: script_buildNumber.js.

Use the Chrome's incognito feature (and not use it when visiting spicy/unpleasant websites).

Just open your browser in Incognito mode https://support.google.com/chrome/answer/95464?hl=en and the browser will cache nothing.

Other browsers have this feature as well (Opera, IE, Firefox, Safari).

As I noted in my comment on the question on January 12th, renaming the file worked. This seems to be currently the only way, although it's far from ideal.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!