• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hide HTML in Browser

 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way in the HTML or HTTP to instruct the browser (IE, Netscape, Firefox)
not to display the source so the users can not view the HTML code of the page by
just clicking View -> Source in the browser?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope

nothing you can do

Eric
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

Are you worried about others looking at your code? If yes, you can try to obfuscate it .
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean really. Why bother?
 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
I mean really. Why bother?


To protect my javascript.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the browser can see it, the end user can. So your only bet is obfuscation.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to hide your JavaScript that is probably not even worth taking, you can use a packer http://dean.edwards.name/packer/ and select the shrink variables checkbox.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic