Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox: How to reload form *without* caching user-input?

BACKGROUND:

When you have a page that includes an HTML form, and you refresh/reload the page or use the back button, Firefox is kind enough to repopulate your inputs with what was entered before you navigated away.

PROBLEM:

For some use-cases, this is not the desired functionality. Fortunately, there are ways around this behavior if you are willing to use one of the "redraw without caching" options below:

redraw without caching  ;; Press CTRL+F5 
redraw without caching  ;; Press form "Reset" button while holding SHIFT
redraw without caching  ;; Cut the address from the address bar, Paste it back into the address bar, press ENTER
redraw with caching     ;; Press F5 

The problem is, not all users know these options, and some just want a simple "Reset" button that they can click on with the mouse without having to use the keyboard.

QUESTION:

Is there a way to get Firefox to do a "redraw without caching" in a way that lets the user simply click on a button with the mouse, and not have to use the keyboard?

like image 657
dreftymac Avatar asked Dec 27 '22 20:12

dreftymac


1 Answers

For the sake of completeness:

<script>
document.FORMNAME.reset()
</script>

It resets the form with the name FORMNAME on every reload of the page.

like image 156
Dennis Avatar answered Jan 13 '23 13:01

Dennis