Link to home
Start Free TrialLog in
Avatar of rettiseert
rettiseert

asked on

A simple web page that can't be saved on HD

Hi

I have a text in a web page. Visitors should be able to read the text, but they should NOT be able to:

- copy it and paste elsewhere
- save the web page (or, more specifically, the text)
- let their browser save the text to the cache
- copy and paste the source code to "rebuild" the text
- use any method to extract the text

in other words, visitors should not be able to keep a copy of the text (unless memorizing, taking screenshots, or copying it manually of course).

The web page must run on almost any browser (it is not acceptable if it only runs on IE7). It would be great if it is possible to run it on IE5 and above. Also, this should not use ActiveX or Java applets. This should be as straight forward as a simple html page, with nothing to install.

I know basic stuff about javascript, php, html and mysql. Perhaps this can be done with ajax or maybe flash (but I have never used flash before!!!), or maybe you know a better (more compatible) method.

I would appreciate if you post an example. Thank you!
Avatar of Dartagnan_of_BigHill
Dartagnan_of_BigHill
Flag of United States of America image

There is one solution. A scripter by the name of Robert Plank has created a script for doing the exact thing you want. It is not free . I think its 19.95 bot its called CodeWarden, and from what I have read it uses php and MySQL do do exactly what you wish.

You may want to check it out.

Everything else I know of is javascript, and even then its not so much foolproof as anyone that can run a telnet command or anyone that knows how to use PrintScreen can grab the text if they wish.

But maybe its wort ha shot. Hope this helps.

http://www.codewarden.com/

Dartagnan
Avatar of dbrunton
Hmm.

Had a browse at the codewarden demo page using Firefox.  He disabled the right click OK but I could still select all of the text and copy it into a text editor.

Note that I couldn't see the code he used, either using View Source or when I pasted into the text editor.  That part worked OK.
CodeWarden is pretty good, but is not fool proof.   Firebug, for example can be used to reveal, your source.  (Your source also be copied, and pasted - as ASCII codes though).
"but they should NOT be able to:

- copy it and paste elsewhere
- save the web page (or, more specifically, the text)
- let their browser save the text to the cache
- copy and paste the source code to "rebuild" the text
- use any method to extract the text

in other words, visitors should not be able to keep a copy of the text (unless memorizing, taking screenshots, or copying it manually of course).'

You are OUT OF TOUCH WITH REALITY.

The who point of a web page is for the user to GET information from the web.  Once that information is downloaded into the user's browser, there is NO WAY AT ALL you can stop that user from saving the info to their hard drive.  Anyone telling you otherwise is just simply kidding you.

If you do not want anyone to be able to save your web page, then DO NOT put it on the web, it is THAT simple.  By the very nature of web pages, whatever the browser gets from the web, the user can save the information from the browser to the hard disk.

This program "code Warden" is just a ruse, stopping right clicks and such.  All a person ahs to do with your page is do View- source -- and the ENTIRE PAGE can be saved to the hard drive.

Please educate yourself as to what a web page means.  It means it is AVAILABLE TO THE WORLD WIDE WEB -- that means, everyone on the planet -- no if, ands or buts.
SOLUTION
Avatar of Dartagnan_of_BigHill
Dartagnan_of_BigHill
Flag of United States of America 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
You could enter the text into an image editing program and save it as an image.

Of course there are plenty of programs that can scan images for text... ;)
Hi,

There is a web developer plugin for Firefox that allows you to view all the javascript even if it is located in include files. The page code must be executed by the client therefore it will appear in the DOM somewhere. None of these right click prevention things work. If you don't want it copied, then don't put it on the web. If you really have done something that noone else has done before, then don't make it publicly available. If you're doing nothing new, then don't kid yourself into thinking that everyone out there will want to steal it. As for codewarden... Seems to save the pages as MHTML which are just plain text and base64 encoded binary content in a single file. This can be easily decoded to reveal the code. Using Firefox 3 I was able to view the source easily on codewardens "demo" page. Don't waste your money or effort in trying to protect the code or images. If someone really wants them, they can always take them one way or another. Every time I've come across these pages that say they prevent people from stealing your hard work, I've ALWAYS found ways to get around them, without exception. Not because I want what is on the site, purely because it says it can stop me from doing so. I enjoy the challenge. The simplest way to prevent people from taking the text or code is to take a screenshot of the page and just render an image to the client machine. That way they never see your code. If it is the content you want to protect, then obviously they can take a screenshot of the page or save the image locally. If you wish to protect content and not the page code, then password protect the page and only give it to people you trust not to give the cotent out. To address your requirements one by one:

- copy it and paste elsewhere
You can't stop this completely. Javascript methods can help but the only way to do this is to make the text portions images, but this doesn't stop them saving the images and using a program to read the text from the image.

- save the web page (or, more specifically, the text)
You can't override the browser functions to stop this.

- let their browser save the text to the cache
You can add meta tags to prevent local caching but you are reliant on the browser adhering to these tags

- copy and paste the source code to "rebuild" the text
Source code can be retrieved easily unless you use something like an image to display the content or maybe an embedded flash or java app.

- use any method to extract the text
Not possible. There is always a way.

To give an analogy, if a person can invent a lock, there will always be a person out there that can pick it.


Cheers,

Lee
Avatar of dcpetersonp
dcpetersonp

There is absolutely only 1 way to do this which is what Sheallaidh said.  You have to rasterize the text into an image format (jpeg, png, gif, etc).  Absolutely no other way will work because anything sent over a wire can be caught with a packet sniffer which you cannot stop.

ImageMagick is a free open source solution that will do this very easily and the quality with the right settings will be good.

http://www.imagemagick.org/script/index.php

I would recommend that you accept the solution and move on.
There are plenty of code libraries that can scan an image for text and output it as a text file. This wouldn't work very well either.

Lee
and the all have very limited font support for scan accuracy.
Avatar of rettiseert

ASKER

Hello everyone, and thank you for your comments.

OK, I'm going to explain a little more...

I agree that is not possible to  stop completely grabbing the text from a webpage (believe me scrathcyboy and everyone else, I know it and I can't think of a way that won't allow doing it myself)

But I really don't want to protect the contents of the page from dozens (or millions) of experienced users. I'm only trying to protect it from A SINGLE NOT EXPERIENCED USER who is the only one meant to see the page (and just a single time by the way).

This user is not a programmer, she does not nothing about HTML, Javascript, sniffers, internet protocols, Firefox plugins, advanced tools, DOM inspectors, etc. But she knows how to save a web page, she knows how to right click on an image and select "Save image", she knows that once a page has been visited traces of it are automatically saved to the hard disk, she knows how to copy/paste text and images, and maybe she knows how to open the the source code, save it and open it again (even if she does not understand a thing of it).

So, how can we make the things difficult for a user like this?. Disabling the right click is the first step. What else? What headers to use to disable cache? Using code in include javascript files is another idea? I believe there are scripts that wont allow selecting text so easily right?

Can you give an example of things like this?

Thank you
ASKER CERTIFIED SOLUTION
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
Thank you Dartagnan_of_BigHill
I'm goint to test the code and I'll let you know