5 Replies Latest reply on Oct 16, 2006 1:45 PM by Newsgroup_User

    disable view html source code

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

      Thanks
      David
        • 1. Re: disable view html source code
          Stefan_K. Level 1
          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, ...
          • 2. Re: disable view html source code
            Stefan_K. Level 1
            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, ...
            • 3. Re: disable view html source code
              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.
              • 4. disable view html source code
                dempster
                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.


                • 5. Re: disable view html source code
                  Level 7
                  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.