Protect Javascript

Programmers are usually very possessive of their code. So if you think you have written this great script in JavaScript and don't want to share it with everyone, you can hide it from the web page source using the SRC attribute of
Here my_Secure_code.js is the name of the file containing your JavaScript code. As evident from the SRC value, the file is located in the same directory as the html document. The file name can be anything you desire, however, the extension must be .js.

This method of hiding and protecting the JavaScript code is not foolproof. Though the JavaScript code is not displayed when you view the page source, smart visitors can check their cache and can find this external JavaScript file there. Also, web site grabbing programs like Go!zilla or Getright download external JavaScript files to display the web page correctly.


Comments

Author: vijaybabu26 Oct 2009 Member Level: Silver   Points : 0

nice one thanks man its really helpfull

Author: saravana jagan01 Nov 2009 Member Level: Silver   Points : 0

good tips, helps a lot.
keep it up

regards
jagan

Author: Gaurav Aroraa01 Nov 2009 Member Level: Gold   Points : 1

Hello Datta,

A good tip helps a lot.
Its a good but you can make it extraordinary try to revise it.

Author: Prakash kumar pothal18 Feb 2010 Member Level: Gold   Points : 1

hello Datta,
This one a good tips .I have no idea before.its really helpful for all.



Regards,
prakash



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: