I am using HTML, and I’d like to hide the script tag from the user’s view. When the user views the page source, the definitions should not appear. How do I accomplish this?
Example
<script type="text/javascript" src="My1.js"></script> <script type="text/javascript" src="My2.js"></script> <script type="text/javascript" src="jquery.js"></script>
I’d like to hide the definitions, any idea?
You cannot hide HTML. If you want a closed-source solution, use a proprietary format, such as Flash or Flex.
You can, however, obfuscate your JavaScript code (you should shrinkwrap or minify it anyhow) which makes reading it harder.