
|
View Full Version : how to prevent a user from saving an html page
vikas_82 12-11-2005, 03:11 AM Hi All,
Is it possible to prevent a user from saving an html page.
i dont want the user to see the javascript codes that i am using..
Regards,
Vikas
koushibasaki 12-11-2005, 03:27 AM I dont think it is possible. Even Google cannot hide their Adsense's javascript code. So I don't think others can. I would be interested to learn how because I have 2 unique javascripts to protect.
StackHost 12-11-2005, 03:36 AM In order to protect your HTML and Javascript you could utilize HTML encryption. Usually this will cost you a few dollars, but if your code is valuable and worth protecting to you, then it could be worth it.
Of course you would need to worry about someone reverse engineering your encryption software and cracking the code, however that would take a bit of time and trouble and a lot of education, which most people wanting to rip a javascript wouldn't need to do, as they would be able to develop the script without a problem.
A search on google for html encryption will get you going in the right direction.
chris_jon 12-11-2005, 04:32 AM Here are some direct links for you.
You may find a lot more if you find on Google. :)
http://www.rlrouse.com/html-encryptor.html
http://www.protware.com
http://www.aerotags.com/products/tlp.php
http://www.freedownloadscenter.com/Web_Authoring/Misc__Web_Authoring_Tools/HTML_Encryption_2_01.html
http://www.share2.com/htmlencr
WireNine 12-11-2005, 04:39 AM You should try not to double post the same thing.
There is no way of protecting your html code in my opinion, some html encrypted websites are not well protected and can be easily copied.
NyteOwl 12-11-2005, 03:44 PM Bottom line is that if it gets displayed in an end user's browser it can be copied. The only true way to protect such things as scripts is to run them server side rather than in userland.
bqinternet 12-11-2005, 04:57 PM No. When it comes down to it, it is not possible.
wbpro 12-11-2005, 05:19 PM why protect HTML code? what is so valuable about it? notice that is if plain HTML anyone can just make it look the same by looking at the page (without seeing the source code), now if you have a very good work in JavaScript then things are different even thought JavaScript is not HTML.
wahm-host.com 12-12-2005, 11:36 PM This is a question You cannot just encrypt it???
HostRefugee-Vince 12-12-2005, 11:40 PM Even HTML encryption is not enough.
Older versions of the netscape browser can easily crack the encryption for you. All you do is go to the site, hit Save As or whatever it is.
It then saves all the images and html. If you open up the HTML it shows both the encrypted and unencrypted HTML.
chris_jon 12-12-2005, 11:41 PM This is a question You cannot just encrypt it???
Not really...because the browser will understand ONLY an unencrypted HTML code. So, somehow you have to throw raw HTML code to the browser to parse it.
wahm-host.com 12-12-2005, 11:41 PM ohhh I know that the right click script dont really help either cause they can still view source
HostRefugee-Vince 12-12-2005, 11:46 PM ohhh I know that the right click script dont really help either cause they can still view source
There was a particular site I went to at one point in time.. The right click was disabled, and when I clicked View Source, nothing would happen. By that time I was getting a little pissed, so I tried in netscape and mozilla. Same thing..
Finally I just hopped on one of our servers and did a wget thinking it would be my solution. That didn't work either, all I got was an .html file that was blank. I have no clue on how they did it, but that was the best protection I have seen yet.
EDIT: No I don't remember the URL
AH-Tina 12-12-2005, 11:48 PM This question is often asked on some of the webmaster newsgroups I peruse. The general rule is....if you are asking how to hide your HTML, you probably don't have anything worth stealing.
In other words, "how do I hide my source code." is almost always asked by a newbie who's just hammered out one of their first few websites. After that, you know better.
I remember asking the same question back in the day. ;)
--Tina
StackHost 12-12-2005, 11:50 PM that would definitely be great protection.
AH-Tina 12-12-2005, 11:50 PM There was a particular site I went to at one point in time.. The right click was disabled, and when I clicked View Source, nothing would happen. By that time I was getting a little pissed, so I tried in netscape and mozilla. Same thing..
Finally I just hopped on one of our servers and did a wget thinking it would be my solution. That didn't work either, all I got was an .html file that was blank. I have no clue on how they did it, but that was the best protection I have seen yet.
EDIT: No I don't remember the URL
If you can find the URL, post it. I bet it was something obvious, such as 100 blank lines at the top of the HTML document.
We get "how did they do it?!" questions every once in awhile at alt.www.webmaster and it generally takes the regulars less than 15 minutes to figure out how they've done it...and crack it.
--Tina
tassie 12-13-2005, 02:00 AM HTML encryption only keeps the honest people from copying. Honestly, anyone who really wants your code will get it. :S
WebDesignGold 12-13-2005, 02:34 PM If somebody wants to encrypt his/her site, then why do we have to tell them not to do it? I've recenttly developed a site to someone who runs a business. His business idea was quite unique for his region. After only a couple of months someone else started a similar business. The first thing he did was copying almost everything related to marketing.. even used the same phrases etc.. then he made a site where he also copied a lot of ideas from the site I did. Just imagin this.. I hadn't put any copyright notices first, but added a line at the bottom later. It was nothing original, just the standard "copyright, all rights reserved" thing. He added one immediatly after this!
I knew, after seeing how the site was build, that he was an amateur. Now the owner I developed the site for wants to add some tables with a huge amount of information and small pictures about his products. He has been working hard gathering it from different sources and writing in his own words and all that.. Now the copycat will surely just take all that work and put it on his site.. I'm thinking of implementing some kind of encryption my self. Nothing to do with "hiding some bad code that one may be ashamed for showing to others" as geeks see it.
You see, I'm not concerned about some hackers which may crack the encryption here. If I can prevent this person then the purpose is fulfilled.
Here's what I found. And there's of cource other solutions.
Free obfuscating HTML encoder (http://www.ioncube.com/html_encoder.php).
the_pm 12-13-2005, 03:08 PM The problem is that using these techniques, you end up obfuscating your code from users as well. 10-15% of your audience will not see the page, because they have JavaScript partially or fully disabled. Search engines will frown on these techniques as well, many refusing to index you or hurting your rankings. If someone wants to copy/paste the information on the screen and use it, they'll do it, no matter how "amateur" they might be.
If someone is copying you, go through the proper legal channels instead of punishing your honest visitors with these ill-conceived techniques.
Dan L 12-13-2005, 03:31 PM Why do you care if someone steals it?
If they can't get past an encrypted page, chances are their site gets less than a dozen visitors a day. If they can get past is, chances are that they could just hire someone to or write the code themselves.
On top of that you have Paul [the_pm]'s issue of the page not working for some people, and the page taking longer to load. If your page is especially large, decoding the encrypted html could take a while.
Also, how did you learn javascript? Did you ever look at someone else's source code to see how they did something? I've done it dozens of times before, and I'd bet you have too..
----
Another option for encryption I thought of a while ago is using PHP to serve the page as an image. That's the only nearly foolproof method to protect it, though the page will most likely never be viewed by anyone with a low-bandwith connection. Even if you do that and use an image map, the JS is still visible..
Lose-lose situation.
innova 12-15-2005, 12:18 AM By necessity HTML is open source. Embrace it.
I have no clue on how they did it, but that was the best protection I have seen yet.
Annoying javascript hack probably.
Shaliza 12-16-2005, 05:31 PM There really is no point. If someone wants to copy the source code bad enough, they will eventually find a way.
Honestly, if you don't want people to be able to copy something of yours, the best protection would be to not post it on the internet.
innovation 12-16-2005, 10:51 PM Urm, maybe if you disable right click, put the actual website in a frame, and encrypt the source code.
AH-Tina 12-16-2005, 10:54 PM Urm, maybe if you disable right click, put the actual website in a frame, and encrypt the source code.
1. Impossible to disable right click
2. A frame? Pointless.
3. Not possible to encrypt the code.
If the browser can read it, the HTML can be "stolen".
--Tina
innovation 12-16-2005, 11:26 PM Then in that case it's impossible to prevent the saving of a web page :P
What you can do though is make your site immensively popular so that everybody knows what your template looks like and therefore would be 'unstealable'.
Also, I'm 70% sure encrypting CAN be done somehow. Once I have downloaded a php script, and one of those files was encrypted to prevent you to take off the 'Powered By' sign. Then another file had the codes to decrypt it.
But going against that, a user can just take a screenshot of your page and do a little bit of slicing :P
Shaliza 12-18-2005, 07:43 PM What you can do though is make your site immensively popular so that everybody knows what your template looks like and therefore would be 'unstealable'.
Yeah, like if someone tried to steal MTV's layout, they'd get busted right away.
That's probably the closest solution you will find!
|