Link to home
Start Free TrialLog in
Avatar of spadeworx
spadeworx

asked on

how do i disable "save" and "save as" options of web-browser while it is viewing my html page?

I'm working with one of my client and his requirement is to disable the copying of the content which his client is viewing. I'd done the basic stuffs of disallowing copy/cut-paste and printing. But, the viewer can easily download the content using "save-As" options present in the "Web-Browser". So, i need to disable it programmatically as soon as my html page is activated.
ASKER CERTIFIED SOLUTION
Avatar of bugs021997
bugs021997
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@spadeworx

Frankly anyone with a basic knowledge of computers can easily grab the contents of the website even if you have blocked the copy/paste, right click disabled....I would suggest you can protect your images by doing as below...


Now listen to me, do this:

1st Create a *.Js file with the scripts:

var myVar='<img src="myimg.jpg" galleryimg="no">'
document.write(myVar)

2nd In your html put your script:

<html>
<head>
</head>
<body>
...............
<script src="myscript.js"></script>
</body>
</html>

with this:
Your image will now show the icon "save as" and, when you save the page, the browser (IE) save the all the page without your img.!

Copying the text can be done anyways....
@spadeworx

But again there is a loop hole to it....Moreover, my suggestion will mean that users that have client-side scripting disabled won't get an image at all.

I shall ask you who cares when the user can just right click and select "Save as..."? Or take a screen shot. Or look in the script file and obtain the URL.

The average user really doesn't care about saving your content. Even if they did, it would be for personal use only which is not something to be concerned about. People that actually go looking for content to steal (whether to sell or use in their own site) will not be bothered by anything you try.

You secure nothing, but do manage to obstruct visitors from using their browser properly. That is hardly something to be proud about.
Avatar of BogoJoker
BogoJoker

I am going to agree with the experts here.  Disabling anything inside the browser is impossible.  Allowing a webpage to manipulate the browser would be a major security hole and the concept of a webpage controlling the browser just doesn't make sense.

Secondly, the webpage, your html and images, is completely downloaded to the client's computer when they first view it.  If they need to find the image they need only look in their cache or temporary internet files... the data is somewhere on their computer the moment they are viewing the page.

That means if you want to disrupt the user's normal interaction between a browser and a webpage you are just going to frustrate them.

Unless there is a good reason or specific situation surrounding the content that you don't want downloaded you can only mask or obscure the information because by the time the user sees the webpage, they already have the data on their computer.  Always available to be saved forever with the "Save" and "Save as" options.

- Joe P
simple question, simple answer: you cannot. Dot.
Wait, there is one solution: don't deliver the page.
Forced accept.

Computer101
EE Admin