I have a custom javascript component in my vaadin application which extends AbstractJavaScriptComponent
.
@JavaScript({"javaScriptConnector.js", "MyComp.js", "MyCompHtml.js"})
public class MyComp extends AbstractJavaScriptComponent {
.....
.....
}
Whenever I do a change to MyComp.js
, I need to clear my browser cache to see the change. This is ok when I develop the app, but I cannot ask my users to clear cache once the app goes live.
Is there a way to prevent browser caching of MyComp.js
? I am aware of the trick where you append a query string to the javascript (eg: MyComp.js?v=1
) but I have no Idea how I can do that to the vaadin AbstractJavaScriptComponent
.