• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

HTML - Hide source code

How do you hide the source code for your web pages?  I have gone to sites where you cannot see there code.
0
lpetrowicz
Asked:
lpetrowicz
2 Solutions
 
Alan HendersonCommented:
You can disable right clicking on your page. See here:
http://www.thescripts.com/forum/thread95183.html

But this may annoy some of your visitors. They can't access other functions like bookmarking your page.
0
 
Alan HendersonCommented:
There's also a commercial product here:
http://www.protware.com/
0
 
R7AFCommented:
Don't let this fool you! Open this "encrypted" page in Firefox, with Firebug installed, THEN view the source using Firebug, and you'll see the complete HTML structure. If you click the edit-button in Firefox, you get all source code, no problem. The encryption has disappeared! Completely vanished. This is vaporware!

And this so-called right-click trick, that's only for IE users. And it doesn't apply to the view source via the menu.

Please show us these sites where you couldn't see the code. I'm curious!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
R7AFCommented:
If you want to hide your code, then you can use Flash, or make everything an image, or create a java applet, or maybe ActiveX if it's IE only.
0
 
jasonsbytesCommented:
there is no good way that works 100% of the time...

other than the ideas to use FLASH only, but if your site is HTML there is no full proof way.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you cannot hide the html resulting code.
the browser NEEDS that code to display the page.

what do you want to "hide" from the end-use of the source, actually?
0
 
R7AFCommented:
And why do you want to hide it?

Is it Google, that you don't want Google to find certain things? Then use robots.txt to let search engines know what to index and what not.

Do you want to prevent other developers from copying your code? If you have done something unique and really valuable, the best way to protect it is to put a copyright notice in it, to document it and publish that in a blog. Then you get credit for it, people will find you and some will pay you to do your trick.

But probably somebody else has already done this, and you better accept the idea that this is the way it is, and aren't you copying for yourself as well? (We all do!)
0
 
LeeKowalkowskiCommented:
> I have gone to sites where you cannot see there code.

You didn't try hard enough.

--
Lee
0
 
Alan HendersonCommented:
You still shouldn't do it except in exceptional circumstances.
Here's why:
http://www.sitepoint.com/article/dont-disable-right-click

:o)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now