1. Technology



Definition: Like encryption, obfuscation is a means of concealing the content of your HTML or Javascript from casual view. Unlike encryption there is no decryption script required since the standard obfuscated values are interpreted by the browser exactly the same as if the plain characters were there.

With HTML the obfuscated versions of characters are ampersand variables. These consist of an ampersand foloowed by the numeric value associated with the particular character in the character set that the web page is using and is then terminated with a semi-colon. These are directly readable by the browser as if they were the original characters

With Javascript and for values in web links the value starts with a percent sign and is followed by the two digit hexadecimal value of the character. These are directly readable in web addresses as if they were the original characters. In Javascript you simply anclose the entire obfuscated string inside of an unescape() function call to tell the browser how to handle the code.

As the means of converting these values back into readable text are well known using these techniques does not hide your page content from individuals viewing your page but it may be sufficient to conceal information from web spiders.

  1. About.com
  2. Technology
  3. JavaScript

©2014 About.com. All rights reserved.