Forum Moderators: open

Message Too Old, No Replies

Delete a visitors cache?

Is this possible?

         

streetutopia

1:32 am on Dec 23, 2003 (gmt 0)

10+ Year Member



I am a developer who does not want his site files cached on a visitors computer after they have left my site. Is there a javascript or some web-based app. out there that will delete a visitors cache after they have left my site?

bill

1:36 am on Dec 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Put this in your <head>
 <meta http-equiv="pragma" content="no-cache">

streetutopia

1:53 am on Dec 23, 2003 (gmt 0)

10+ Year Member



Sorry, I should have been more detailed.
Pragma no-cache is the answer if I were only using html, php, asp... but if I am loading say a mp3 from my site into a swf enviroment it will cache it. SO, what I am looking for is a script that will clean a visitors cache when they leave the site or close the browser so they don't have access to the mp3 after the leave.

Krapulator

2:02 am on Dec 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I very much doubt this is possible.

I, for one, do not want a webmaster to be able to arbitrarily decide what MY computer does and doesn't cache.

streetutopia

2:39 am on Dec 23, 2003 (gmt 0)

10+ Year Member



I not trying to "arbitrarily" delete someone's cache, I just want to protect my files (ie .mp3) from being utilized after the visitor has left my site.

amznVibe

2:47 am on Dec 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This falls into the same category of question "can I prevent a visitor from seeing my html source". It's simply not possible because its not the way the web is designed.

A person doesn't have to use a browser to get your mp3, they can use a variety of programs like getright, etc. So removing a cached copy is the least of the problem with your concern.

If you don't want it shared/saved, don't put it on the web, period.

jdMorgan

2:52 am on Dec 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



streetutopia,

You can modify your server configuration to return the cache-control: no-cache header for all mp3 files. Alternatively, you can set the files as cacheable, but set a 5-minute expiry time on them, for example. This has the advantage of minimizing the load on your server for short-term "replays", but makes the client "check-in" with your server for any reloads past the specified expiry time.

How you do this depends on your server, and what privileges you have, but it's quite simple on Apache if you can use .htaccess.

These approaches do not modify the user's cache, they simply prevent files from being cached, or make them expire in the cache after a short interval.

Jim

streetutopia

5:24 am on Dec 23, 2003 (gmt 0)

10+ Year Member



Thanks for your help Jim.