Today i StumbleUpon a strange cache behavior of Firefox 4 which is described bellow.
-
There is a form
<form name="widget"> <input type="hidden" name="position" value="-1" /> </form> -
On an arbitrary event i have changed it to say “rss”.
-
After refreshing the page using “F5”, i access the value of
alert(document.widget.position.value);which is returning “rss“. WHY THE OLD VALUE?
-
But after refreshing the page using “Control+F5”, i access the value of
alert(document.widget.position.value);which is returning correct “-1“. WHY NOT FIRST TIME?
I am really confused by this behavior.
NOTE: Only FireFox4 is doing it, chrome i fine but did not tested on ie.
I think it’s FF’s caching of forms/input element values that’s bugging you. You may want to use:
and to change the value:
Furthermore
<form ... autocomplete="off">seems to work.