Web Development

General discussion


Saving files w/o the webmaster's consent

By kamiko_hiranuma ·
I don't know where else this is posted, nor do I know where to look. Anyway, I've noticed there is this function in IE 5.5 and/or IE 6 where they allow the user to save the picture that the pointer is pointing at. I want to be able to disable this function throughout my whole website so that no one can save any pictures from my site. If anyone knows a way to do this, please email me or just post the answer here. Thanks :)

-WM in need

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

you're too late at that point

by Jay Eckles In reply to Saving files w/o the webm ...

Bad news. By the time the user is looking a picture on your website through his browser, it's too late to prevent the user from saving the picture. It has already been downloaded and saved into the user's cache. If it had not been, then the user would not be able to see the picture.

The whole point of the web is to make information widely available. Precisely one method will prevent users from saving the image: remove the image from the web server.

That being said, if you REALLY want to try, here are some things you can do ***(these will really only slow a person down who wants the image, not stop them)***.

1. disable right click (Doesn't work on computers without right mouse buttons like Mac, nor does it work when Javascript is disabled). Details about "how" are available all over the web.
2. disable "hot keys" like CTRL+S for save (You'll likely find only an IE-specific solution for this, which makes the workaround easy: use Netscape).
3. Make sure to open your web page in a new browser window with no tool bar or button bar (of course, a user could just choose to open the page manually instead of using your rude Javascript link).
4. Serve the images dynamically using Cache-control headers to suggest that the browser not cache the image.

The sad thing is that no matter what broken method you try, one can always just read the HTML for your site, get the image URL, type it into the browser, and PRESTO, one image, ready for saving.

Like I said, if you're trying to prevent the user from saving information you've already sent to him, you're too late. However, I do understand that some times these requirements come from clients who just do not understand the paradigm and you have to work with them somehow. If this is your case MAKE SURE you explain that you CANNOT prevent the saving of pictures, you can just make it a bit more difficult.

Collapse -

by kamiko_hiranuma In reply to you're too late at that p ...

Thanks...but what about cookies? I heard from somewhere you can actually get the computer to delete the file if you set its expiration date to today...

Collapse -

you create cookies

by Jay Eckles In reply to

A cookie is just a small bit of text information that you ask the client to store on his or her computer. You can set the expiration date such that the cookie should be deleted when the user quits his browser session, but there's no reason that a browser couldn't archive "expired" cookies. In practice, most browsers follow the expriation date and do delete the cookie.

Of coruse, since you were the one to create the cookie, it stands that you should have the ability to determine its maximumlifetime. I say maximum because a user can delete the cookie any time he desires.

However, this is sort of off-topic since cookies are very much different from web content. Cookies are a part of the protocol that runs the web, HTTP.


Related Discussions

Related Forums