How to Keep People From Viewing the Source of Your Web Pages
As a web page creator, it can be frustrating when you spend lots of time coding your web pages only to discover that someone else has copied your hard work and used it as his own. Using the "View Source" option from any browser, users can see the language used on your site and simply copy and paste it. Fortunately, there are a couple options to help you ensure that your work is better protected.
Things You'll Need
- Obfuscation software, such as HTML Guardian (optional)
- HTML text editor
Instructions
-
Encrypt the Page Code
-
1
Look for obfuscation software. You can find programs on the Internet, such as HTML Guardian, by searching for terms like "obfuscate software," or you can access a compiled list of offerings on a web page like File Guru. Obfuscation programs are software packages that process page code so that it encrypts the syntax and make the content unreadable to others when published on the web.
-
2
Review the application offerings and determine the product that works best for you. Decide whether you want the program to scramble just HTML code, or if you need it to hide scripting language such as JavaScript and PHP. Also, use the demos on the provider's site to ensure that you are comfortable with the interface and that the program will run on your computer's operating system.
-
-
3
Purchase, download and install your preferred application. Refer to the developer's instructions for installation.
Reformat the Page Source
-
4
Launch an HTML text editor, such as Dreamweaver, and open an existing web page.
-
5
Go to the source code view of the document so that you can edit the syntax.
-
6
Remove all of the carriage returns to make the code into a single, continuous line. Although the code will still be visible to others, this process deters copycats because they have to parse the never-ending code line and take extra time to make the code workable again.
-
1
Tips & Warnings
If you use obfuscation software, be sure to keep a "clean" copy of the page so that you can continue to work with it.
Do not reformat your page source if you need to keep JavaScript comments or make use of the "<pre>" or "<textarea>" HTML tags.