Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop Firefox from caching the contents of a textarea on localhost?

I am working on a site locally, which has a lot of <textarea> elements.

However, everytime I reload the site the content in the <textarea> is still there. This only happens when I hit reload / F5.

What can I do to stop the site from being cached, without using any in-browser functions.

I am looking for a solution within the site, so when other users in my office opens it, they won't have the same problem.

like image 600
Maximilian Lindsey Avatar asked Jan 04 '12 15:01

Maximilian Lindsey


1 Answers

You can disable it in your html by setting the autocomplete attribute to off:

<input name="whatever" type="text" autocomplete="off">

You could also disable it for the entire form:

<form name="form1" id="form1" method="post" autocomplete="off">

https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion

like image 167
jantimon Avatar answered Sep 18 '22 15:09

jantimon