Link to home
Start Free TrialLog in
Avatar of srividya_kris
srividya_kris

asked on

Disable source viewing option?

How can "view source" option for a HTML document be disabled?
Avatar of mayhew
mayhew

You can't.

The best you can do is open a new browser with no menu bar.

But that will only work with inexperienced web users.

Anyone can view the source of a page sent over the web.

If you send it, it's viewable.
Yep, like mayhew says,

because html pages are client sided they can be viewed all over the world, though you can adapt some tricks, but nothing can totally prevent viewing your source.

Some tricks :
-disabling right click
-opening window without menubar like mayhew says
-encrypt your code

Though like I said it's not fully protective.

Joseph
ASKER CERTIFIED SOLUTION
Avatar of xabi
xabi

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
Maybe our question to you should be what are you trying to hide?

HTML?
JavaScript?
or
What?
actually every kind of source can be put in iclude files making them unviewable...but there's always gonna be a smartass that will be able to view it!
See the question ablut two down from yours titled:

disabling html code to browsers

There is no way to 100% hide the source code because the browser has to "see" the code in order to render it.  that means there is a copy of the page on the client machine to play with that can eventually lead to the code.
If you want to hide some tricks, you've made code it in java. there's no way to see code.
Actually a good way to prevent anyone from stealing your hard work html is to do it in Flash. The Html Page reads from a .swf Page and noone can see your work even if they really wanted to, not even if you are an experienced Web User.
Not even SWF files are safe from people wanting to get into the source. I have seen utilities on the Internet that allow you to unlock and open SWF files into their native FLA format. Sorry to burst your bubble cepedare.
The best you all can do is do your homepage in Flash. all your work and images are safe and nobody can steal them. For you all that don't know what flash is just do a quick search.
Cepedare, read my comment just before yours. If you publish stuff on the Internet - it's not safe. Period.
oh sorry for missing your comment CyberSoft. I wasn't aware of those utilities. But all I am trying to say is that by doing it in flash is more safer than html. Do you agree?
Yes, I do agree that Flash files are safer than HTML. But the point remains that anything you publish on the Internet is open-source. If you want to prevent someone from (well not physically but legally) you need to apply for local and international copyrights for whatever it is you are publishing on the Internet.

Regards,
CyberSoft