0

I read once that I can hide JavaScript using frames.

But I still cannot figure out how to do it. Some JS web pages show a blank page when you click on view source option.

I need to do the same, any idea how?

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
Shadin
  • 1,867
  • 5
  • 26
  • 37
  • it is impossible. you can make your javascript difficult to read using available tools, but that is it. – akonsu Jul 04 '13 at 03:41
  • agree with @akonsu, ultimately the client's browser will have to execute the javascript code and will therefore need a copy of the source for doing so. access is possible. – Raj Nathani Jul 04 '13 at 03:45

1 Answers1

1

You can't effectively hide from the client any data like HTML / CSS / JS that the client will be displaying / executing.
The most you can do is make it harder for a user to get his hands on the client side code, but in the end it will take you a bigger skill level to hide it than it will take the user to find it.

Here's a few things you can try:
- Obfuscate the script.
- have the script remove it's own tag from the HTML when the page loads. I'm not sure about the behavior, or whether that will unload the script or not.
- Have the logic you don't want the users to know run on the server side.

LordFokas
  • 68
  • 5