About ads on Siafoo
Hide Siafoo is here to make coding less frustrating and to save you time. Learn More Join Siafoo

Stop Firefox from Persisting Select Box State across Reloads

Abstract: When you reload a page with a selection box in it, Firefox keeps the selection box at its old option, even if the default in the HTML has changed. To fix it, add 'autocomplete="off"' to your form.
Languages HTML

Firefox caches form data. This is fine most of the time, but sometimes when you reload a page the form defaults change. By default, Firefox doesn't realize this for select boxes.

Reloading the page via another method, like highlighting the current url and pressing enter, works as expected: all fields are updated.

The solution is to add the attribute autocomplete="off" to the form element containing the troubled select box.

For a good example of how things should work, check out the Siafoo Syntax Highlighting Demo. (Shameless self-promotion)

Further Reading

nodans.com - Firefox Caches Select Box State
I found the solution in the comments of this post.
Keywords Firefox (2) select box (1) caching (1)
Average
n/a
Rated
0
Times
5
4
3
2
1
0
Owner: David
Group Owner: iCapsid
Viewable by Everyone
Editable by All Siafoo Users
Sponsored Links
About ads on Siafoo