-1

I have a form where in the user goes and types a text in the text field. My problem is that when the user is visiting this page, the previous text that has been typed in that text box is being displayed. I donot want that to happen as that text is a sensitive issues. Can anyone provide me a solution for that.

I tried using this code in javascript to clear the form cache but of no use. I also tried clearing the browser;s cache but of no use. Please suggest. Thanks.

 [code]
 function clearForms()
 {
 var i;
 for (i = 0; (i < document.forms.length); i++) {
 document.forms[i].reset();
 }

 </script>

 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 </head>

 <body onLoad="clearForms()" onUnload="clearForms()">


 [/code]

Also, attached is the image which you would help you in a better understanding of what I am saying.

CentosUser
  • 201
  • 1
  • 4
  • 14

1 Answers1

-1

Take a look to this question -> Make page to tell browser not to cache/preserve input values

Community
  • 1
  • 1
cyraxjoe
  • 5,308
  • 3
  • 25
  • 40