Specials | Announcements | Contact | Site Map
Willmaster.com
Hijack-proof forms. Surveys. List building.

Solid, safe website tools.

Whatever your need, Will Bontrager builds powerful software solutions.

Affiliate Cookie Setter
Search WillMaster.com:

WillMaster > Support > CGI Q&A

If you don't find the answer to your question in these archives, ask your CGI question at the Current Master Series CGI Forum.

A CGI script to prevent viewing web-page sources

Author Message
11Oct01

Norman
Subject: A CGI script to prevent viewing web-page sources

Hi Will,
I am in search of a cgi-script that will prevent others from viewing the source codes of the web pages I am publishing. Is this possible and do you have such a script r is there one out there on the internet that I can get?

11Oct01

Will
In response to: A CGI script to prevent viewing web-page sources

It's probably impossible.

In order for a browser to render a page, the browser must have the source code. The source code is sent from the server to the browser; only then does the browser render the page.

If the page could be rendered on your server and displayed that way, methods could probably be found to hide it. But that's not the case.

Circumvention techniques abound. Most ustilize JavaScript and do things like disabling the right mouse button. But all JavaScript techniques can be circumvented by tunring off scripting.

Some people resort to making a page confusing to read by humans. One such method is to remove all non-essential spaces and linefeed. Another is to encode everything within the BODY section like the scheme used at http://willmaster.com/possibilities/demo/aelgwase.html But programs can be made to reverse those pages and make them human readable.

The only method I can think of at the moment is also impractical. If a program on your server would generate an image that represents your page and then send only the image tag to the brower, then there would be very little source code to copy. But this is impractical because the image file size would tend to be too large for people's patience.

I expect there are methods I haven't been exposed to. If you find one of those, go to http://willmaster.com/master/snooper/ and pick up a copy of Master Snooper. If Master Snooper can't retrieve the source code, I'll be very interested in knowing what you have found.