Preventing Firefox from remembering the input value on refresh with a meta tag
For an input
tag there's the attribute autocomplete
you can set:
<input type="text" autocomplete="off" />
You can use autocomplete for a form
too.
Firefox keeps form data on reload
Just add autocomplete="off"
to your inputs and you will solve the problem.
<input type="text" autocomplete="off">
jQuery to solve this on all inputs and textareas
$('input,textarea').attr('autocomplete', 'off');
Is there a way to tell Firefox not to remember the state of my input fields on page refresh?
You can set the element or the form to autocomplete="off"
to disable state preservation, but that also disables input autocomplete, of course.
Is there a way to tell Firefox not to remember the state of my input fields on page refresh?
You can set the element or the form to autocomplete="off"
to disable state preservation, but that also disables input autocomplete, of course.
Bug With Firefox - Disabled Attribute of Input Not Resetting When Refreshing
This is a "feature" of Firefox which remembers form input values across page refreshes. To fix this behavior, you simply set autocomplete="off"
on the form containing the inputs, or just directly to the input.
This stops autocomplete from working and prevents the browser from remembering the state of input fields.
Alternatively, you can just "hard-refresh" by clicking CTRL+F5. This will completely reset the current page.
Firefox: what is the difference between reloading a page and re-getting page?
Imagine you spent 3 hours writing something and you somehow reloaded page, everything can be lost, so Firefox auto fill these fields for you. It helps you to not loose data.
Sometimes reloading page keeps some relationship with previous state, while re-getting - not. Example you submit form. Re-get will load page again with default values, reloading will try to resubmit form.
Firefox cache textarea value?
For textarea only:
<textarea autocomplete="off"></textarea>
For all form fields
<form autocomplete="off">
Preventing Firefox from remembering the input value on refresh with Meta tag
Firefox & reloading page: keeps unsubmitted value for select
Workaround: I had to disable autocomplete.
Either on specific element or the the hole form.
I found the solution from here
Related Topics
Why Does Margin-Top Work With Inline-Block But Not With Inline
Text Overflow Ellipsis on Two Lines
How to Tell If a Browser Is in "Quirks" Mode
Two Inline-Block, Width 50% Elements Wrap to Second Line
Make an Image Responsive - the Simplest Way
Is the 'Type' Attribute Necessary For ≪Script≫ Tags
Use CSS Gradient Over Background Image
Why Top Margin of HTML Element Is Ignored After Floated Element
Can the ≪Script≫ Tag Not Be Self Closed
Responsive CSS Trapezoid Shape
Elongated Hexagon Shaped Button Using Only One Element
How to Have Two Fixed Width Columns With One Flexible Column in the Center