Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hide the source codes

Status
Not open for further replies.

zxmax

Technical User
Nov 24, 2003
179
CA
Hi everyone, i've seen on some web site, that you can't view their source codes, i would like to do the same for my web site,

Also notices, that the (edit) button on exploere is grayed out, that is what i want ,

Any ideas how that is done ? resources ? thanks

 
not sure what you mean about the source code, you dont want a 'surfer' to see any of the code? You are not able to see coldfusion code so maybe on your home page you create some frames and when you declare what pages show in the frames put them inside some CF tages maybe something like
<cflocation url=&quot;Default.cfm?> Then you shouldnt be able to see what the page name is, hence you will not be able to view the code for the page. I would disable any kind of right clicking so that you cant 'open in new window' and then go to 'view source', if so you would be able to view any JS and HTML. As far as the edit button goes you can look at some JS event handler such as onload
<BODY onLoad=&quot;toolbar=no&quot;> this would hide all...
hope this helps, research on GOOGLE
 
JJ , thanks for the reply,

what i meant by the source code, is i don't want the surfer to see any codes. IF that is not possible , at leaset i don't want them to see the Coldfusion codes /
PS the web doesn't have any frams,

My next question is: disableing any right click, does that make the web site unprofessional ?

thanks again
 
Coldfusion code is processed on the server and all that is viewable to the user is the HTML. The Disabling of the 'Right Click' is limited solution. What about a left handed mouse setup? They would not be able to click on links. And the primary button would then give them the option to view source as normal. Also there is the View > Source (IE of course) that works as normal.

I see it as an Irritant and if someone wants something from your site (pic or text) it will only stop the few with limited computer skills. For me, if it is viewable in a webpage or a linked Jscript or CSS file, I can get it.
 
The main points have already been brought up on this:
1) CF Codes will not be sent back to the browser, only HTML.
2) Disabling right click will affect any left handed setup users.

Even if you disable the Edit menu and the right click, what's to keep the user from just saving the file to their computer? If it's out there, it can be retrieved, if you want it bad enough.
 
zxmax, this can't be done. There are alternate solutions out there like &quot;no righ click&quot;, or putting the pages inside frames, or pushing the page like 100 lines down the page so it appears the view source is empty, but all in all, no matter what you do, you can't trully hide the source.

CF processes the CF code on the server, but when after it loads the page on the browser, you can still the code for that page load. Only thing I can tell you is 1) forget about it, or 2) create the site entirelly in flash and no one will ever see your code.


____________________________________
Reality continues to ruin my life...
 
thanks guys,
its true, all the coldfusion codes are not shown on the surfer side, only the html are viewable, which i don't care about,

many thanks
 
MadCracker, yes, you can hide your source code if you do the following:

open your web page source code in NotePad

find the &lt;html&gt; tag

immediately after it, put a new line with

&lt;view source=&quot;no&quot;&gt;

find the &lt;/html&gt; tag

immediately before it, put a new line with

&lt;/view&gt;

now no one will be able to VIEW SOURCE and read your code!




rudy
SQL Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top