View Full Version : how to stop IE5 + from caching - not the META tag

02-11-2004, 02:01 PM
HI, I'm aware of the META Tag:

<meta http-equiv="pragma" content="no-cache">

but this does not actually prevent a file, a JPG for example, from actually being physically placed in IE's TEMP folder.

I want to protect my client's JPG's or other files from users. And I don't want the file being saved in the clients computer in any form.

does anyone have a solution? How to disable caching altogether, or delet file in the cache?



02-11-2004, 02:11 PM
you can't stop your users from geting the images, even with disabling the cache. afrter all, all they need to do is to do a screen capture.

02-11-2004, 02:24 PM
thank Jbot.
By I'm using this in conjuction with a script which disables the clipboard, and the right-click button. In this instance not even 'prnt scrn' works!

In light of this, is there any hope for what I want to do, or not.
thanks again


02-11-2004, 03:00 PM
Disabling cacheing via the meta tag only works post-session. Everything is downloaded to the user's machine during the session, otherwise you'd see nothing. no images or code, so in short you can't stop the images from reaching the user's hard-disk.

You could always put the images into one frame quick-time movies.

However, most of the stuff you've mentioned won't work in non-MS browsers. A user could spoof entry to your site using Opera (even if you've barred that browser) and still get access to the images. You can't disabled the clipboard in opera.

02-11-2004, 03:41 PM
cool, thanks for your help jbot, its been really useful.
i think I'm going to look at the quicktime option.
Having just spoken to some people in the office, there are actually a number of interesting, complicated options.
the image could be put into a .swf file. Flash provides quite a lot of flexbility, in terms of file types, and the ability to capture key strokes.

anyway, thanks again, I'm off to do some annoying cross-browser testing.......


Roy Sinclair
02-11-2004, 05:29 PM
Search this board for the word "protection". Once you've done that you can save yourself a lot of time you'd otherwise waste trying to pound this dead horse more.

02-11-2004, 06:37 PM
note of caution: you can still screengrab images from flash movies, but no from quicktime ones because of video overlay.

hence, you should go with the quicktime route.

Roy Sinclair
02-11-2004, 07:22 PM
You can grab the entire quicktime video, why settle for just a screenshot? And what about the users who don't have Quicktime installed? The same goes for Flash too.

Oh yeah, go to your page and then put the following into the address bar of your browser:

javascript:(function() { function R(a){ona = "on"+a; if(window.addEventListener) window.addEventListener(a, function (e) { for(var n=e.originalTarget; n; n=n.parentNode) n[ona]=null; }, true); window[ona]=null; document[ona]=null; if(document.body) document.body[ona]=null; } R("contextmenu"); R("click"); R("mousedown"); R("mouseup"); })()

That little bit of code will restore the context menu that your no right click code disabled. Of course I could also add your site to my "Restricted Sites" zone so all your scripts don't run in the first place which means your site is again totally available. I could also disable all javascript and again get the same result. Last but not least I could go to the File menu and use the "Save As" option to save your web page and all it's objects straight to any directory on my machine I want it in.

If you don't want people copying it, don't make it available. Frankly most sites I've seen using "no right click" scripts weren't worth copying.

02-12-2004, 06:34 AM

02-13-2004, 01:39 PM
hey Roy, thanks for the tips man. But I'm not trying to protect any precious code or my amazing site.
I'm working on a web based market research tool, and sometimes we have to protect the media that our clients provide. Thats all I want to do.

thanks again