Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

The Source of an HTML Document

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
daniel_limbert
Asked:
daniel_limbert
1 Solution
 
aarieCommented:
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
 
ShaunWildeCommented:
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
 
GreymanCommented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
nico5038Commented:
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
 
kg_bangCommented:
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
 
crazymanCommented:
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
 
kg_bangCommented:
how does it help? he can always go to view->source
0
 
ShaunWildeCommented:
I forgot all about this Q :)

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

ditto
0
 
crazymanCommented:
i know it wasnt an answer but i saw it had been mentioned and no code posted.
:o)
0
 
kg_bangCommented:
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
 
andy_wolfCommented:
What about password protecting your page ? When hosted on a apache webserver you can use the htaccess-mechanism to protect subdirectories.
0
 
MattCCommented:
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
 
omry_yCommented:
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
 
ShaunWildeCommented:
I don't think he is coming back - shall we divvie up the points - only kidding :)
0
 
webhermitCommented:
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
 
ShaunWildeCommented:
> <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
 
GUEENCommented:
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
 
RedCCameleonCommented:
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
 
nico5038Commented:

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
 
NetminderCommented:
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now