Solved

The Source of an HTML Document

Posted on 2000-03-30
20
347 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
how does it help? he can always go to view->source
0
 
LVL 9

Expert Comment

by:ShaunWilde
Comment Utility
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
Comment Utility
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
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 1

Expert Comment

by:andy_wolf
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I don't think he is coming back - shall we divvie up the points - only kidding :)
0
 
LVL 1

Expert Comment

by:webhermit
Comment Utility
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
Comment Utility
> <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
Comment Utility
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
Comment Utility
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
Comment Utility

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
Comment Utility
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about a problem I had getting the GPS LocationListener working.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

744 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

11 Experts available now in Live!

Get 1:1 Help Now