1

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() method. 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.

1
  • How are the parameters supplied to the applet? What is the HTML being used? What is the code (SSCCE) that fails? What is the URL where we can see the failing applet? Commented Jul 17, 2011 at 15:41

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.