Webmaster Tips & Tricks by Bravenet (http://www.bravenet.com/) for Tuesday 5/6/2002 BODY TAG Code Protection While there is no way to completely hinder others from taking your source code, here are some very cool tricks you can use to make code-snatching a little more difficult. After all, webmasters are notoriously lazy; disabling right-click may well be enough to stop visitors from viewing - and taking - your valuable code. All of the below tricks employ a tiny snippet of scripting code inside your page's BODY Tag. Try some of these to get a feel for what they accomplish when embedded into the tag. Disable Right Click (to View Source): Disable Mouse Dragging (Highlighting): Disable Keyboard Use (Select/Copy): More information on source code protection can be found here: http://www.bravenet.com/reviews/searchtips/8hidesource.php ============================ Online Source Code Validation One of the most curious things about publishing information on the Web is that most webmasters cannot vouch for their own code. That is, they may preview their work in a browser or an HTML editor, but most of us are never really sure if we have followed the correct syntax throughout our HTML coding. Let's face it, HTML is neither art nor science, but a mixture of both. We are so used to getting mixed results that many of us have entirely neglected to validate our own code to make sure it follows official HTML standards. While most HTML editors will have a validation routine built in (USE IT!), here is an online resource that lets you type in the URL to a page for code validation. Be aware you may be prompted to use some character encoding for this script to work properly. A normal HTML encoding element would look something like this: The validator works off a simple premise to allow full cross-platform compatibility to your HTML code. This means proprietary tags specific to some browsers, or other tags not fully supported, will not validate through this system. The object here is to determine if your pages are in effect understood by any browser, using approved HTML that will function across all platforms. http://validator.w3.org/ While we believe platform-independent code is a goal worth striving for, it is almost impossible to create completely standardized pages. At least an attempt should be made, and we find we always learn something when running code validations. At worst, a visit to this resource will be an introduction to the online Mecca of HTML writers: http://www.w3.org.