Link to home
Start Free TrialLog in
Avatar of letchev
letchev

asked on

JAVASCRIPT - in .js file and script

Hello!

Could you please explain me some features of the Javascript?

1. Which is the difference in use a .js file or into HEAD section?

2. How I use a .js file instead a js  into HEAD section?

3. It is secure the encryption of js? There is a way for reading it although encrypted? or for decrypt it?

4. If we want use several javascripts which is most useful? Into .js file or as script into HEAD section?

Thank you very much.

Letchev

ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of letchev
letchev

ASKER

Thank you.

Regarding question "3" do you know the script for encrypt javascripts from:
http://www.dynamicdrive.com/dynamicindex9/encrypter.htm ?

What yoy thinks about this script for encrypt js script files?

Thank you again

Letchev
That is no encryption.
That is simplest use of escape() and unescape() functions of JavaScript.
That is poor mans method to hide the script from JavaScript novices.
What I wanted to say is that there is no way to make JavaScript encrypted, you can make it only difficult to be read by human beings. But browser needs to see the script to be able to execute the script.
If you need a bit more difficult script hiding in IE, then look for this:
http://www.microsoft.com/downloads/details.aspx?FamilyId=E7877F67-C447-4873-B1B0-21F0626A6329&displaylang=en

And even for that, hackers interested in reading your code can even decrypt that encryption.
Avatar of letchev

ASKER

Thank you again

Letchev
You are welcome.