Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox keeps form data on reload

I have a big problem with the functionality in Firefox that keeps data that the user have filled in on reload F5. If i use Ctrl+F5 the forms are cleared and this is great. My problem is that not all my users know that this is what they have to do to force the input cleanup. Is there a way in the html or response headers to tell Firefox to not keep the data in the forms?

like image 967
Andreas Avatar asked Sep 11 '11 09:09

Andreas


People also ask

How do I get Firefox to remember form data?

Check Firefox settings and select Settings. Select the Privacy & Security panel and go to the History section. In the drop-down menu next to Firefox will choose Use custom settings for history. Make sure that Remember search and form history is selected.


1 Answers

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'); 
like image 50
Andreas Avatar answered Oct 03 '22 19:10

Andreas