Shoutbox

disable right click on website? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: disable right click on website? (/showthread.php?tid=58461)

disable right click on website? by DJKAL on 04-18-2006 at 12:35 PM

is it possable (and if so how to code it?) to stop webpage veiwers being able to right click?
i'm sure i've seen it done before on several websites to stop yo being able to save pictures and/or to stop you veiwing the page source etc...

please help :)


RE: disable right click on website? by user35870 on 04-18-2006 at 12:39 PM

There is  one here: http://www.dynamicdrive.com/dynamicindex9/noright.htm but they aren't 100% proof as there is the print screen button to take pictures from the site and other ways to view the source of a page.


RE: disable right click on website? by DJKAL on 04-18-2006 at 12:41 PM

it is mainly to stop people vewing the page source. as my mate will "steal" the codes and i just want to see his reaction when he cant :P

thanks for the link :)


RE: disable right click on website? by Chestah on 04-18-2006 at 12:41 PM

Note this is completely pointless as users can get your pictures / anything they want by viewing the source code. Also, as you are disabling right click, you are breaking alot of expected functionality :S.

I don't recommend this.


RE: disable right click on website? by DJKAL on 04-18-2006 at 12:43 PM

noo, the pictures im not worried about really. but it's the source code that i want to stop them veiwing. and im pretty sure my mate only knows how to veiw it by right clickin (the way i taugt him)


RE: disable right click on website? by Chestah on 04-18-2006 at 12:45 PM

Whats wrong with them knowing the source code? What they see is what they see.. and anything that processes data etc (php) is hidden so they won't beable to see that :P.


RE: disable right click on website? by DJKAL on 04-18-2006 at 12:47 PM

oooohhh yer, set an external CSS style sheet ...?
i suppose that could work, btu i think i showed him how to veiw them aswell, lol.


RE: disable right click on website? by Chestah on 04-18-2006 at 12:48 PM

More information on why not to use it:

http://shoutbox.menthix.net/showthread.php?tid=41863&page=1

:P


RE: disable right click on website? by stoshrocket on 04-18-2006 at 12:54 PM

dude, you cant stop people viewing your source code and you'll always get people that want to rip your code off if its decent, even if you do disable right click whats to stop me going to view -> page source?? (n)


RE: disable right click on website? by DJKAL on 04-18-2006 at 12:55 PM

i just read that,
but i also read encrypting the page source ...?


RE: disable right click on website? by stoshrocket on 04-18-2006 at 12:57 PM

if you read that then you wouldve read that its easy to decode again 8-)


RE: disable right click on website? by Chestah on 04-18-2006 at 12:57 PM

quote:
Originally posted by DJKAL
i just read that,
but i also read encrypting the page source ...?

People will still beable to read it as your browser somehow has to interpret was is written so it can produce it on the screen. HTML really isn't that bad anyways, the complex code that you use will most likely be in PHP scripts that will be hidden. :)
RE: disable right click on website? by DJKAL on 04-18-2006 at 01:00 PM

i use CSS, haven't learnt any PHP yet.  :(
haven't had the chance.

quote:
Originally posted by Methos2
if you read that then you wouldve read that its easy to decode again
i did read that to, but i not sure how easy he will be able to do that :refuck:
i just want to see his reacction when he realises he cant just copy my codes and use then for himself :dodgy:
RE: disable right click on website? by Chestah on 04-18-2006 at 01:01 PM

btw with php - it still outputs html that people can steal the source of. Obviously if your pages are static (i.e not dynamic) then theres no point in using PHP.


RE: disable right click on website? by stoshrocket on 04-18-2006 at 01:03 PM

quote:
Originally posted by DJKAL
i use CSS, haven't learnt any PHP yet.  :(
haven't had the chance.

quote:
Originally posted by Methos2
if you read that then you wouldve read that its easy to decode again
i did read that to, but i not sure how easy he will be able to do that :refuck:
i just want to see his reacction when he realises he cant just copy my codes and use then for himself :dodgy:

bah, gtmf

first result :P
RE: disable right click on website? by DJKAL on 04-18-2006 at 01:04 PM

i'd still like to learn PHP though. just to be able to use it if/wehn i needed to.
i dont mind him having the HTML as such, as long as i could blick him getting the CSS

on some websites access is disabled when going to certain parts.
like .. www.url_here.co.uk/pics/pic75 (fake address obviously)
and you can veiw the ic.
but if you try to go to
www.url_here.co.uk/pics
you get an error page saying you dnt have rights to veiw this section. is this posssbale to do o stop him seeing my CSS?


RE: disable right click on website? by John Anderton on 04-18-2006 at 02:18 PM

quote:
Originally posted by DJKAL
i'm sure i've seen it done before on several websites to stop yo being able to save pictures and/or to stop you veiwing the page source etc...
it is possible but its too easy to bypass it :-/ Tbh there is no point in doing so. There are a million ways to by pass it and well, it just makes your site look newbish tbh (A) (for not knowing how easy it is to bypass :p)
RE: disable right click on website? by Sypher on 04-18-2006 at 02:23 PM

*sign... some people*

In holland we have the saying "Hij heeft de klok wel horen luiden, maar weet niet waar de klepel hangt" .. :P

Anyhow, disabling rightclick doesn't stop people from viewing sourcecode..

A few ways to do so:
- Using a website rip application
- Disabling javascript and thus disabling your script
- Disabling changing/blocking of context menu's in Firefox
- Firefox ignores most of the scripts...
- Pressing CTRL+U in Firefox gives the source (menu View -> Source)
- Internet Explorer/ Firefox: Saving a webpage and opening with notepad...
- view-source:urlhere (view-source:http://google.nl)

The contextmenu was designed to offer extra functionality, and with Firefox some extensions add some of these extra things..

With other words, don't waste your time :)


RE: disable right click on website? by Ezra on 04-18-2006 at 02:24 PM

and encoding with javascript will make sure people without javascript will not be abled to see your website :P


RE: disable right click on website? by DJKAL on 04-18-2006 at 02:27 PM

i dont use javascript anyways :undecided:

ok, i wont do it - never mind
thanks anyway

~end of~


RE: disable right click on website? by Svip on 04-18-2006 at 02:31 PM

No, it is in no way at all possible to hide the CSS from the user.  If the browser have to reach it, the user will be able as well.  These things are client sided, and thus all information send by the server can be used by the browser.

Another reason is that the feature you are asking for is not standardized javascript, and is only supported by Microsoft's Internet Explorer browsers.  Users using other browsers will not at all feel the affect, in fact, extentions in Mozilla's Firefox enables the user to actually get the CSS by clicking a button.

So no, you cannot hide the CSS, and why would you?  Does he steal it?  Who cares?  He is probably a noob and knows nothing.

Besides and for the record, CSS, HTML, PHP and MySQL are no where similar to each other, they are four completely different things.  Although they are normally used together to form websites (such as this), but one of them does not require the other (although CSS would look stupid without HTML, and PHP works best when outputting HTML (but can be used for other stuff as well)).


RE: disable right click on website? by DJKAL on 04-18-2006 at 02:34 PM

quote:
Originally posted by Svip
Besides and for the record, CSS, HTML, PHP and MySQL are no where similar to each other, they are four completely different things.

i know that, i never mentioned the other's. i use XHTML and CSS with some Javascript. thoguh i'd like to learn  PHP soon. i know they arent the same and they are verydifferent.
RE: disable right click on website? by Svip on 04-18-2006 at 03:18 PM

quote:
Originally posted by DJKAL
quote:
Originally posted by Svip
Besides and for the record, CSS, HTML, PHP and MySQL are no where similar to each other, they are four completely different things.

i know that, i never mentioned the other's. i use XHTML and CSS with some Javascript. thoguh i'd like to learn  PHP soon. i know they arent the same and they are verydifferent.

My point was mainly that, you may compare C and Python, as they are both programming languages, but you cannot compare a programming language with a markup language.

But again, I am sorry to disappoint you, there really is no way to "disallow" your friend from stealing your source.
RE: disable right click on website? by DJKAL on 04-18-2006 at 04:41 PM

ok, never mind them. i jsut wont send him a link but a print screen instead :refuck:


RE: disable right click on website? by DJeX on 04-18-2006 at 11:03 PM

quote:
Originally posted by DJKAL
ok, never mind them. i jsut wont send him a link but a print screen instead :refuck:

(h5)