Forum Moderators: open

Message Too Old, No Replies

Can you detect a 'view source'

         

too much information

5:29 pm on Jul 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was just wondering if there is a way to detect when someone viewes your source for your site?

You can detect a right click, but can you narrow it down to detect a 'view source' choice in the menu?

would be kinda fun to see what IPs view your source and if they come back again and again.

g1smd

8:01 pm on Jul 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would think that you can't detect what buttons the user is pressing on their browser.

tedster

8:03 pm on Jul 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From what I know, browsers take the "View Source" content from the cache rather than calling on the server again. Given the possibility of dynamic content changes after the page loads, that only makes sense.

So the server doesn't know that a View Source happened.

TheWebographer

8:06 pm on Jul 18, 2003 (gmt 0)

10+ Year Member



Its possible, in some instances, with javascript but in reality there is no way to protect your code from even a marginally adept web user.

too much information

2:10 am on Jul 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not really concerned with protecting my code, I just thought it woule be fun to see who is peeking behind the curtain.

stevenha

2:41 am on Jul 27, 2003 (gmt 0)

10+ Year Member



Perhaps you can try this technique. In your source code for certain pages, put a URL reference to a secret page that isn't linked to any other pages. You entice people to read that secret page and then check your logs for references to the secret page. The enticement could be something like: // see pageX.htm for explanation" or // see better version of this page"

GeorgeGG

3:41 am on Jul 27, 2003 (gmt 0)

10+ Year Member



Back around 97 for April Fools day I put some comments in
the code about personal variables like, 'height, weight, hair color,
eye color, sex, phone number, address, etc' were saved to some
fake dir/file.
Think had a few logged requests for the dir/file and
one concerned e-mail :)

GGG

too much information

3:09 am on Aug 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's not a bad idea stevenha, I just might try that, and maybe put a different file name on each page of the site so I can track where they started the view source. Plus I would know for sure that it was a real person.

Thanks!

too much information

3:12 am on Aug 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



GGG - concerned e-mail? Did you start the online dating craze and you just didn't know it?

killroy

12:31 pm on Aug 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How about adding a ¦View Source¦ link at the bottom of the page? Maybe simple but could be effective (not tested).

SN