Situation
On real world we often repopulate user's previously saved data and ask them to update these details.
For example a Profile Page. On here some time user may try to reload the page after altered some data
on form, to get his/her original previous data(which means the data came from server). But browser does not act as he/she thinking. Browser will catch the form data and repopulate what he enter last time, not original data.
Solution
To avoid this we can use a html attribute called autocomplete. Simply set this attribute to false on your form tag.
Example 1:
<form name="profile" id="profile" method="post" action="profile_action" autocomplete="off">
We can use for a particular inputs only, as like below.
Example 2:
<input type="text" name="email" id="email" autocomplete="off" />
On real world we often repopulate user's previously saved data and ask them to update these details.
For example a Profile Page. On here some time user may try to reload the page after altered some data
on form, to get his/her original previous data(which means the data came from server). But browser does not act as he/she thinking. Browser will catch the form data and repopulate what he enter last time, not original data.
Solution
To avoid this we can use a html attribute called autocomplete. Simply set this attribute to false on your form tag.
Example 1:
<form name="profile" id="profile" method="post" action="profile_action" autocomplete="off">
We can use for a particular inputs only, as like below.
Example 2:
<input type="text" name="email" id="email" autocomplete="off" />
No comments:
Post a Comment