• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

disable view html source code

New Here ,
Oct 15, 2006 Oct 15, 2006

Copy link to clipboard

Copied

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

Thanks
David
TOPICS
Advanced techniques

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2006 Oct 16, 2006

Copy link to clipboard

Copied

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, ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2006 Oct 16, 2006

Copy link to clipboard

Copied

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, ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 16, 2006 Oct 16, 2006

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 16, 2006 Oct 16, 2006

Copy link to clipboard

Copied

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.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 16, 2006 Oct 16, 2006

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation