Chapter 11: HTML, ECMAScript, and SVG DOM

   



Protecting SVG Code

People who have strong feelings about this subject tend to be in one of two camps: either they feel that everything should be visible to anyone or they want the ability to prevent people from viewing their code (sometimes written for the purpose of earning a living). Both positions arguably have merit (though that statement itself would probably be contested).

Currently, there is no guaranteed way to prevent people from looking at your SVG code. Placing SVG code in separate '.js' files will prevent the code from being visible via 'view source,' but the code is loaded into memory (in unencrypted form) so it's possible to write functions that will display the contents of all your ECMAScript code. You can encrypt code in external files or place the code in a 'zip' file but once the code is loaded into memory, it is accessible in unencrypted form. You can prevent the uninitiated from accessing your code, but people who are determined to view the source code in plain text can obtain the requisite knowledge to do so.



   



Fundamentals of SVG Programming. Concepts to Source Code
Fundamentals of SVG Programming: Concepts to Source Code (Graphics Series)
ISBN: 1584502983
EAN: 2147483647
Year: 2003
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net