Skip to main content
Known Participant
October 16, 2006
Question

disable view html source code

  • October 16, 2006
  • 4 replies
  • 1398 views
Hi,
Anyone know that how could I disable the html source code, so no one can right click and view source code.

Thanks
David
This topic has been closed for replies.

4 replies

Inspiring
October 16, 2006
Hi,
Anyone know that how could I disable the html source code, so no one can
right click and view source code.

Thanks
David

There are methods that will disable the right click, but then what do
you do for those people that go to the 'View' menu and select 'Page
Source'? Or those who use the CTRL-U? Or those of us who have tools
like firebug that allow us to inspect the source both before and after
it has been rendered.


In other words you can not really do what you want to do, which is hide
your HTML source. The system just does not allow it at this time.
October 16, 2006
Just encypt your source code. Coldfusion has an encyption mehtod which the server can understand but your users cannot. Word of wisdom, keep a backup because it will be encrypted to you too.
Inspiring
October 16, 2006
quote:

Originally posted by: The Albino
Just encypt your source code. Coldfusion has an encyption mehtod which the server can understand but your users cannot. Word of wisdom, keep a backup because it will be encrypted to you too.

That won't work. Once the encrypted cfm code is processed by the server, it is sent out as HTML. HTML code delivered to any browser has to be plain text. That's the whole point of an open system like this. Trying to prevent users from viewing the source doesn't really work.


Inspiring
October 16, 2006
Through javascript you can disable right-clicks.
But there are easy ways around it (disable javascript), so if someone with basic knowledge want's to, he'll get the source.
In fact, it is impossible to hide the source, the browser needs it to display, ...
Inspiring
October 16, 2006
Through javascript you can disable right-clicks.
But there are easy ways around it (disable javascript), so if someone with basic knowledge want's to, he'll get the source.
In fact, it is impossible to hide the source, the browser needs it to display, ...