PDA

View Full Version : Clearing browser cache in Javascript



harshaghanta
12-05-2006, 05:24 AM
Hello,

After i Navigate from one page to another i want my previous pages cache content to be cleared.How can i do that.... ?

djr33
12-05-2006, 05:56 AM
If you could do that, then you could just clear all the files in the cache. For security reasons, I don't think this is possible.

Sending different headers related to caching can control how often the page is refreshed, and you could set that to always reload.

That's about all I know on this subject.

codeexploiter
12-05-2006, 08:19 AM
I think he is looking for a way using which he can prevent his visitors from resubmitting something(form) by clicking the browser's back button or something.

djr33
12-05-2006, 09:46 AM
That's a totally different question, and also complex...
The best (only secure way, I think) is to do a server side check if it's send twice.

codeexploiter
12-05-2006, 11:08 AM
A good tutorial (http://www.devguru.com/features/kb/kb100220.asp) about preventing the user from resubmitting the form

djr33
12-05-2006, 11:36 AM
...it's ASP.
Few servers use it, and few web designers do :p

codeexploiter
12-06-2006, 04:15 AM
...it's ASP.

What i meant is developer can do it more efficiently in the server-side rather than the client side.

djr33
12-06-2006, 05:00 AM
Oh, yes, and it can be used as an example of strategy.
Sorry... I didn't mean to imply that it is worthless.