Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Problem refreshing JavaScript

Remy Travis
8 years ago Apr 20, 2015 12:10pm

Hi guys, my problem is that everytime I refresh my webbrowser (F5 or ctrl+F5) all my JS scripts are not working anymore..

Here is what I defined in my Java class to integrate JS :

@com.vaadin.annotations.JavaScript(value = { "js/script.js" })  //above of the public class ....

JavaScript.getCurrent().execute("myFunction()"); // I call this JS function from my script.js later in a Java function of this class.

If i don't refresh everything works perfectly. How can I deal with that please ? Thank you very much for you help.