Java applet reload
I have a Java Applet which takes two Parameters, X1 and X2. The applet's behavior will vary depending on if X1 > 0 or if X2 > 0, and X1 and X2's state are complementary: when x1 > 0 then x2 < 0, and when x2 > 0 then x1 < 0.
The problem is that every time I load the applet, it loads with the same state as it did on start-up. For example if the first time the applet is loaded with X1 > 0, then every time it uses the X1 > 0 behavior and not the X2 > 0 behavior.
I am loading the parameters in my start() metho开发者_C百科d. If i restart firefox and load the first time with X2 > 0 then the behavior will be always x2 > 0. Is there any way to reload the applet? I tried cache_option and also tried changing the url but neither worked.
Use init()
method to read parameters. And check that you really get correct parameters every time. Probably your HTML page is cached, so you get the same (old) values of parameters every time.
BTW if this is the case use Cache-Control: no-cache on server side that generates your page or/and on client side into meta tag.
精彩评论