Solved

The Source of an HTML Document

Posted on 2000-03-30
20
349 Views
Last Modified: 2010-04-16
Is there any way you can stop other people copying your source as it is a major problem as most people on my course are getting credit for my script
please help!
0
Comment
Question by:daniel_limbert
20 Comments
 
LVL 5

Expert Comment

by:aarie
ID: 2694885
Daniel,

I know it is possible to disable the right mouseclick event by using a javascript, however, I don't know how to do this myself.
You might want to post this question in the javascript section though. They probably know ways to help you out.
Goodluck with it.

Arjan.
0
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 74 total points
ID: 2696373
you might be able to stop the right mouse click - but you will not be able to stop them getting at it from the menu View/Source option - the only way to stop soeone stealing your HTML is not let them get access to it. (if only somebody came up with a binary format for HTML as they did for JAVA.

you could use hidden directories etc - i.e. put the source in a directory that only you know the pathname to. This won't work however if they can browse your directory structure.

However if you feel it is a problem tell your tutor (you don't have to name names) - we are not ogres (I have done tutoring in the past) - and we see plagarism quite a lot - he/she might be able to give you a more secure environment for you to do your work in. We tend to know who is good and who is cheating that is why I personally like exams to be the real decider of pass/fail marks at the end of the term or year, especially those sort of questions that require new thought and not just regurgitated course work.
0
 
LVL 1

Expert Comment

by:Greyman
ID: 2714281
If people are able to browse to your page, they can get the HTML source.  That's how the web works.

I'd follow ShaunWilde's advice if I were you.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 2886741
The only secure way is to store your HTML pages on a physical stand-alone device.

You could work on a separate laptop or place everything on a floppy, just showing it when needed. As soon as you have to publish it, the only protection can be to convert it to an .ocx.

Nico
0
 
LVL 11

Expert Comment

by:kg_bang
ID: 2998512
You can do a lot of things (hide the directory, disable right click. hide in frames etc.) if someone wants to source, he will get it!

to make it harder you can do 2 things:

1. if you're using IE5 only, you can encode the source. (look in msdn for: Windows Script Encoder)

2. you can use softwares that makes your source almost unreadable. (like jammer: http://rzr.online.fr/jammer.htm)

0
 
LVL 13

Expert Comment

by:crazyman
ID: 3090595
Disable context menu in MOST browsers.


<script>
document.oncontextmenu = function(){return false}
if(document.layers) {
    window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown = function(e){
        if(e.target==document)return false;
    }
}
else {
    document.onmousedown = function(){return false}
}
</script>
0
 
LVL 11

Expert Comment

by:kg_bang
ID: 3092336
how does it help? he can always go to view->source
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 3094957
I forgot all about this Q :)

> how does it help? he can always go to view->source

ditto
0
 
LVL 13

Expert Comment

by:crazyman
ID: 3098870
i know it wasnt an answer but i saw it had been mentioned and no code posted.
:o)
0
 
LVL 11

Expert Comment

by:kg_bang
ID: 3098920
you're right about it. well, anyway, i don't like this solution because the right click menu is more then just to view the source (like refresh, properties, print etc.)

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:andy_wolf
ID: 3560774
What about password protecting your page ? When hosted on a apache webserver you can use the htaccess-mechanism to protect subdirectories.
0
 
LVL 1

Expert Comment

by:MattC
ID: 4052666
or get creative an create a login page and have a simple file based username/password.  then only those you want can get to the code.

Seriously though are you on a UNIX server.  if so you could justset the rights to the page so that nobody can see it until the hand in date(make sure you do this otherwise the tutors wont mark it).  that's how i did it the first time.
0
 
LVL 4

Expert Comment

by:omry_y
ID: 4315598
combined with a right click trap, you can also open your soruce in a frame that does not have any toolbars.
java script can do it, I just dont know how.
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 4622588
I don't think he is coming back - shall we divvie up the points - only kidding :)
0
 
LVL 1

Expert Comment

by:webhermit
ID: 5733611
On some browsers this works:
<META content=no-cache http-equiv=Pragma>

it makes it so the view source and save page menu options are grayed out-unfortunately it doesnt work on all browsers-it worked on my site when I had IE 5.0 but it doesnt work in 5.5
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 5733807
> <META content=no-cache http-equiv=Pragma>

yes it is up to the browser to recognise the tag and respond appropriately however it doesn't stop you from downloading the page by normal sockets
or wininet functions
0
 
LVL 16

Expert Comment

by:GUEEN
ID: 6054378
Hi Dan,

Have any of the solutions offered above resolved your problem?
Here are some options:
Select the expert answer that best resolved your problem.
If more then one expert helped you solve your problem and
you would like to divide the points: Post a 0 point question
in the Community Support area
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt 
and add a link that points back to this question.

If the solutions above did not resolve your problem:
1. Create a 0 point question that links back to this question.
Sometimes trying other queues will bring more responses
http://www.experts-exchange.com/jsp/zonesAll.jsp
2. Post a 0 point question in the Community Support area
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
and add a link that points back to this question, with a
request to have points awarded back to your account.
0
 

Expert Comment

by:RedCCameleon
ID: 6423060
daniel_limbert,
please clean up your questions if they have been answered. Please select the best comment, you've received from these experts, as the answer to this question. If you do not let me know anything I will accept ShaunWilde's comment as the answer.

ShaunWilde and other experts,
please tell me if you agree.

RedCCameleon,
COmmunity Support Moderator @ Experts Exchange
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7455551

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - Answered by: ShaunWilde  
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7487873
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now