page source

General technological topics without their own forum go here

page source

Post by doubleman on Tue Jul 22, 2008 5:43 pm
([msg=8010]see page source[/msg])

Is there a way to disable people from viewing your page source by right clicking and then pressing page source, or is that impossible? If someone disabled the ability to right click and not view page source, could you view it somehow anyway? My Mozilla Firefox browser says I only have to press Ctrl + U. If they disabled the right click > page source function, could I still see the page source? Can they disable it altogether?
doubleman
New User
New User
 
Posts: 30
Joined: Thu Jun 26, 2008 4:15 pm
Blog: View Blog (0)


Re: page source

Post by T3hR34p3r on Wed Jul 23, 2008 4:39 am
([msg=8047]see Re: page source[/msg])

I'm no expert on web site management, but I would think that if you wrote your source code properly it wouldn't matter if people could read it or not.
They call me Ishmael... I'm not sure why.
User avatar
T3hR34p3r
Experienced User
Experienced User
 
Posts: 87
Joined: Sun May 18, 2008 2:23 am
Blog: View Blog (0)


Re: page source

Post by nathandelane on Wed Jul 23, 2008 8:09 am
([msg=8058]see Re: page source[/msg])

Yeah it's more important that you worry about writing your web page code in such a way as to hide anything that you wouldn't want others to see. For example if you are authenticating user names and passwords, you'll want some server-side scripts, possibly not in your web directories to take care of that. Obviously writing secure software needs to take priority over securing the code in some way. Don't worry about disabling right-click or whatever -- the only way you can do that is with JavaScript, but if the user of your web page turns off JavaScript on their browser then they still have full access to your web page HTML, JavaScript, and CSS. In my opinion it is very lame when people/companies try to either obfuscate or encrypt, or otherwise secure their code, either web or application. For one thing, it is flattering when somebody copies my code. Not that that has ever happened yet, and once again, if you need security then learn how to write your code to handle the security things securely. That is much more important. Now that I've said everything twice, I hope you understand what your priorities should be, and what your responsibility is in order to keep yourself from being exposed by would-be crackers.
Me, Nathandelane, Highly influential to Hackerdom, Premature Optimization=http://c2.com/cgi/wiki?PrematureOptimization
User avatar
nathandelane
Poster
Poster
 
Posts: 204
Joined: Thu Jun 26, 2008 11:26 am
Location: Utah
Blog: View Blog (0)


Re: page source

Post by doubleman on Thu Jul 24, 2008 1:00 pm
([msg=8168]see Re: page source[/msg])

Yeah, thanks for the advice you guys.

I was trying to find out how I could view someone else's page source in case I wanted to look at it. I thought it might be good to get in some "reading" when learning a language, but sometimes people disable right-click or the ability to view page source.
doubleman
New User
New User
 
Posts: 30
Joined: Thu Jun 26, 2008 4:15 pm
Blog: View Blog (0)


Re: page source

Post by nathandelane on Thu Jul 24, 2008 1:08 pm
([msg=8170]see Re: page source[/msg])

doubleman wrote:I was trying to find out how I could view someone else's page source in case I wanted to look at it. I thought it might be good to get in some "reading" when learning a language, but sometimes people disable right-click or the ability to view page source.


Oh well in that case, just disable JavaScript on your browser and refresh the page.
Me, Nathandelane, Highly influential to Hackerdom, Premature Optimization=http://c2.com/cgi/wiki?PrematureOptimization
User avatar
nathandelane
Poster
Poster
 
Posts: 204
Joined: Thu Jun 26, 2008 11:26 am
Location: Utah
Blog: View Blog (0)


Re: page source

Post by doubleman on Thu Jul 24, 2008 3:57 pm
([msg=8184]see Re: page source[/msg])

Thanks.
doubleman
New User
New User
 
Posts: 30
Joined: Thu Jun 26, 2008 4:15 pm
Blog: View Blog (0)


Re: page source

Post by muller2008 on Sun Jul 27, 2008 9:20 am
([msg=8398]see Re: page source[/msg])

It is not full proof but it will stop the casual person.....
CODE:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="NetObjects Fusion 10 for Windows">
<script language="JavaScript">

var message="Copyright (C) 2008 KHow2.com"; // Put your message for the alert box between the quotes.

// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
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>
muller2008
New User
New User
 
Posts: 37
Joined: Thu Jun 26, 2008 6:45 pm
Blog: View Blog (0)



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron