WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Source code on Thu Aug 19, 2010 5:22 pm

Guest


Guest
Is there any way i can hide the source code of my website?

Thanks Smile

2 Re: Source code on Thu Aug 19, 2010 5:30 pm

Joel

avatar
Registered Member
Registered Member
No way. Even if you disable right click, they can Control U the page and get the codes all out.

http://www.advertisehotspot.info/

3 Re: Source code on Thu Aug 19, 2010 5:40 pm

ankillien

avatar
Administrator
Administrator
Hey,

There is actually no way to hide source code of HTML, CSS, JS or any client side scripts.

Once the site is loaded on user agent, they can get the source code easily.

4 Re: Source code on Thu Aug 19, 2010 5:43 pm

Guest


Guest
oh god,,there are may thiefs that when see something good to your site they steal it using the source code...They must be punished for copyrighting shouldnt they? Sad

5 Re: Source code on Thu Aug 19, 2010 5:55 pm

Joel

avatar
Registered Member
Registered Member
Yes, you can report them Very Happy

http://www.advertisehotspot.info/

6 Re: Source code on Thu Aug 19, 2010 6:30 pm

YanOri

avatar
Registered Member
Registered Member
Joel wrote:Yes, you can report them Very Happy

report them to ?

7 Re: Source code on Thu Aug 19, 2010 9:10 pm

Unknown Data

avatar
Registered Member
Registered Member
It's not 100 % possible to hide the source code, if anybody want to see it, they can do it by will.

But I can also recommend you to encrypt the code, by a encrypter generator, then would it be a little bit harder to open up for your files etc. Wink`

EDIT: This code could also be a possibility - it's gonna hide all the source after clicking view source, but it will not help 100%
Code:
<SCRIPT LANGUAGE="Javascript"><!--
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
//-->
</script>

http://woops.dk

8 Re: Source code on Thu Aug 19, 2010 9:27 pm

Guest


Guest
that only disables right click right?Oh i can still view the source code .

Thanks for the help by the way Smile

9 Re: Source code on Thu Aug 19, 2010 9:38 pm

Unknown Data

avatar
Registered Member
Registered Member
Really? In my browser it shows no source code, everything is gone. Smile
Well maybe it's only working in Google Chrome, I really haven't tested it in anything else.

But anyway I would then recommend the encrypting, many don't really know how to generate it back, so it could be usefull.

http://woops.dk

10 Re: Source code on Fri Aug 20, 2010 5:47 am

Joel

avatar
Registered Member
Registered Member
Other browsers displays other stuffs Smile

Nick, you can report it to Forumotion if the person uses a Forumotion forum. Or rather, just report to the company the person is using Smile

http://www.advertisehotspot.info/

11 Re: Source code on Fri Sep 17, 2010 9:35 pm

Guest


Guest
Try this Smile

Code:

<script type="text/javascript>
var message="You can't see the page code"
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}

if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
</script>

12 Re: Source code on Fri Sep 17, 2010 10:06 pm

Unknown Data

avatar
Registered Member
Registered Member
That's "only" to prevent a person from right clicking. Wink
It will not prevent the source code to be viewed.

http://woops.dk

13 Re: Source code on Fri Sep 17, 2010 10:26 pm

ankillien

avatar
Administrator
Administrator
Unknown Data wrote:That's "only" to prevent a person from right clicking. Wink
It will not prevent the source code to be viewed.

Exactly.

There is no way to hide source code from the end user. Once the page has been loaded on the browser, the code is open to him.

14 Re: Source code on Sat Sep 18, 2010 2:16 am

Guest


Guest
Damn.Lock it and thanks Anki and UD for the help & scripts. Smile

15 Re: Source code on Sat Sep 18, 2010 7:28 am

Jophy

avatar
Registered Member
Registered Member
Solved => Topic Locked

http://www.socialtechforum.com/

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum