Reputation: 8463
I need to refresh the page using jquery? I am using
location.reload(true);This code reloads the page i need to refresh the page(Once a page refresh user entered content would be there). how to refresh?
Upvotes: 0
Views: 851
Reputation: 4670
add this to your form
element autocomplete="off"
that should do the trick
Upvotes: 0
Reputation: 318488
Use only location.reload();
- note that this will not disable caching for the reload. But you cannot preserve both form fields and reload without using anything from cache.
It's very similar to F5 vs CTRL+F5: The first one does not disable all caching but preserves form fields. The latter does not load anything from cache and resets form fields.
Upvotes: 4
Reputation: 187030
AFAIK jQUery will not be helpful in this scenario.
If you are using HTML controls it will not preserve the value after refresh. If you want to preserve the value then you need to use server side controls.
Upvotes: 0