471,873 Members | 980 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,873 software developers and data experts.

Old issue: Hiding Javascript

Hello All,

I've read a lot of stuff which says it's impossible to hide Javascript, so if I get my PHP script to return some Javascript inside some XML using AJAX, how can it be viewed in the browser?

Obviously, some essential Javascript has to be there at the outset, ie. that which handles the AJAX, so you can't hide that, but if you then use AJAX to supply ad hoc Javascript on demand, can it be seen anywhere?

Your technical observations are most appreciated. Thanks for your time and attention.

Dec 22 '09 #1
3 1236
16,027 Expert Mod 8TB
Yes. Try, for example, Firebug (Firefox add-on).
Dec 22 '09 #2
Hey, thanks! Firebug is cool.
Dec 23 '09 #3
rnd me
427 Expert 256MB
ajax uses the same URLs that can be viewed in a browser by placing them in the address bar.

the only way you can hide is with ciphering. here's an app i made that can encode a whole webpage, javascript and all. But, your visitors would need to know the password to view it...

using something like dean edward's packer makes the code look like gibberish, but it's still easy for developers to "roll back" to the real code.

In short, javascript must eventually be delivered to the javascript engine as plain-text code.
that makes it impossible to truly use code without being able (perhaps with difficulty) for humans to read the code.
Dec 23 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Pjotr Wedersteers | last post: by
4 posts views Thread by web_design | last post: by
22 posts views Thread by Mr Newbie | last post: by
5 posts views Thread by skarnath | last post: by
24 posts views Thread by Kourosh | last post: by
11 posts views Thread by mike_solomon | last post: by
reply views Thread by Frank | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.