tags:

views:

136

answers:

5

Hi,

Is there a free open source software for protecting HTML from "select all", "copy" and "save as".

Thanks,

Ahmed.

+10  A: 

No. Neither is there non-free nor non-open source software to do it in a reasonable way.

There are a couple of tricks you could try (generating all the content via obfuscated JS, checking the URI with JS, and so on), but they are easily bypassed and have unpleasant side effects (not least of which is making it impossible for search engines to index the content).

David Dorward
+1 Your website is more than your content. Others can copy your HTML, but not your support qualities or original ideas.
MvanGeest
You are right MvanGeest, but my web site will contain data in HTML which I don't want anyone to copy it unless he is a subsciber otherwies he can only view it.Ahmed.
Prog_Sud
+1 And remember, no matter what you do, I can always download the source of your webpage (no, don't try to disable right-click, there are thousands of other ways to download source). If you obfuscate it, there are enough open-source web browsers (that you *will* have to support) whose code I can borrow to read it.
Umang
Thanks David for your advice.Ahmed.
Prog_Sud
"contain data in HTML" interesting. how do you intend to get data into a markup language?
PurplePilot
PurplePilot, I will change .doc to .htm files, do you have other sugestions?
Prog_Sud
+5  A: 

As David Dorward said, you effectively cannot do this, but there are a few approaches you can take as long as you're willing to abandon pure HTML. All are ugly and I do not advocate their use for a multitude of reasons. Most of those reasons should be pretty obvious.

I mention them only because I have been in situations where I have been required to do this by the business requirements of a customer. I could either lose the customer or figure out a way. Since most business folks aren't software purists, they simply didn't care how it was done. If you're in this situation, I sympathize.

  1. You could generate an image on the server side and display the information as an image. This approach was once used by the local sheriff's office, but they eventually went back to HTML since images are costly in terms of server resources and bandwidth. There are many open source ways to generate images.

  2. You could use a technology like Flash or Silverlight to display the information. You would then have much greater programmatic control over disabling the copying of the information. I strongly prefer the HTML/CSS/JS approach to web programming due to its far reach and simplicity, so I don't recommend this approach either. Also, since it isn't open source, it's probably not an option for you.

Good luck.

Gregory Higley
Thanks Gregory for your advice. Ahmed.
Prog_Sud
+2  A: 

To put it bluntly there is nothing that will piss me off faster about a web site than the developer trying to take control of what I can do with my browser. I'm not alone in this regard so do realize that many people will eventually just say to he'll with the web site and whatever business it is trying to support.

The simple way to deal with this is to simply avoid showing the nonsubscriber the data in question. Rather feed the nonsubscriber dummy info or good info that gas critical parts obscured. What you don't want to do is to screw around with code that hamstings somebodies browser or worst makes that browser unstable.

Basically it comes down to this do not cause harm and do not impact normal operation of a browser. There are perfectly sane ways to show a nonsubscriber what he might get if he where a subscriber with out risking vast amounts of content.

Dave

David Frantz
+2  A: 

This is absolutely no way to achieve your underlying aim, which is (apparently) to stop a non-subscriber copying or saving data. If a user can see the data, then they can copy it. End of story.

They can take a screenshot and use OCR. They can always get out a pad of paper and a pencil and copy it down. This might seem like a lot of effort, but you have to ask yourself: is it worth the effort to evade what you're charging for subscription?

The best advice is to find another way to do business.

detly
+1  A: 

If you allow something to be readable by users on the web, it will be possible to copy.

One can always take screenshots or simply write the text again while looking at the original.

Arve Systad