Discussion Locked

Prevent View Source Code

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I would like to know if there is a JavaScript code that stops the source code from being viewed completely. I don't mean any of those disable right click codes either.

3 replies

by mtadeu

If you don't want your code to be seen in a web page, make an activex control! use it in your html, vbscript, javascript or watever is the language you want to use.If you understand COM/ActiveX programming, this shouldn't be a problem!

Good luck,
Miguel Tadeu

by marty r. milette

Yes, unless you use some form of encryption, there's nothing you can do to stop anyone from viewing the HTML. Anyone can 'telnet' directly to the web server, or use an application they can create in VB in about 2 minutes to see the source coming directly from the server.

The JavaScript encryption solution will work, but can also be reverse-engineered easily. Only valuable to prevent the 'casual' thief. Also, if JavaScript is disabled (as it more and more often is to avoid pop-ups), then clients can't view the page.

Same with ActiveX controls and Java Applets. More and more people are disabling them because of the security risks. Corporate networks are getting very tight.

If your audience is a 'known' entity (intranet), company, etc. with standard browsers/configuration, and/or you could become a 'trusted site', then you may have more options.

This discussion is closed to new replies.