Is there anyway to hide Javascript?

SpaceshipSpaceship
NamecheapNamecheap
Namecheap AuctionsNamecheap Auctions
Watch

kishore415

Established Member
Impact
0
I want to hide javascript code shown using 'view source' ...I know one way of doing it by keeping it in an external file .js but I don't want to keep the javascript file as an external file.

Can you please help me , if you know how to this?

Thanks in advance.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
Close
You can make it a little harder for someone to read, but technically it is impossible to hide javascript. The reason is that it runs in the browser so the browser must be able to read it. But if the browser can read it, anyone can read it.
 
0
Close
keeping it in an external file does not hide it, it can still be viewed.

also, the method above, if i am thinking correctly, is really easy to bypass.
 
0
Close
well its like the quote " you can't hide html from client but only can make it hard to read " is applicable to JS too.
 
0
Close
Zero posted a good link above.

If you didn't want to go that far, you could always crunch/obfuscate it.
 
0
Close
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back