Does anyone know of a simple way to hide source code?
Also, is there any way to disable the ability to right click a page and save an image off a Web site?
Does anyone know of a simple way to hide source code?
Also, is there any way to disable the ability to right click a page and save an image off a Web site?
No… it only makes you look like an amateur if you try.
There are “tricks” you can do to make it harder, but anyone who really wants to take your images/source can do so easily.
Yes, you can disable the right click menu, but the page source, images etc can be viewed/saved anyway
http://javascript.internet.com/page-details/disable-images-click.html
If they can’t right click, then how would they get at them?
Alt, V, C
What about encrypting the pages I want to protect? Any recommendations on specific software, scripts to use?
If you put it on the internet, its available to everyone. What’s so important about your source and images, btw?
If these are photos taken by you, just add a watermark.
What kind of source code?
I almost always put javascript in an include so that it can’t be seen. Not because my code is clever and unique, I just don’t want people seeing what a mess it is.
Protecting images is a common concern. I just read an article about using .htaccess to prevent hotlinking, but I don’t have a good solution to prevent people from saving the pics. Tricks? Yes. Solutions? No.
Disabling right click really turns me off. I won’t revisit a site that does that. I tried to copy a URL from a site today so that I could recommend them! I got a warning that the site content was copyrighted.
They get the shooting self in foot award.
Yes you can use includes even for javascript but where you have the file you are including may still be protected so that you can’t map to it.
Your correct about the print screen stuff though. Like I mentioned on father up in this or on another thread simular topic too this one, if you don’t want people to copy what you have published well then just don’t publish it in the first place then.
Here is the code you need to stop a visitor being able to not right click on you page
<SCRIPT LANGUAGE=“Javascript”>
<!–//
var message=“Sorry can’t do that!!!”;
function click(e)
{
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// –></SCRIPT>
But doing this is really amature and their are two simple ways around it.
Using this feature is really amature though so if you plan on wanting to protect something on the internet is best to not put it their in the first place.
screw the right click thing, make a double layer over your images, tho i forgot my code already…it was pretty ingenius though…i’d have just a transparent gif file stretched over my images, so when someone right-clicks on them, they just save the transparent gif, instead of the picture.
Hey thats the best answer to the issue I have heard so far.
I like your way of thinking.
Originally posted by InQuE
screw the right click thing, make a double layer over your images, tho i forgot my code already…it was pretty ingenius though…i’d have just a transparent gif file stretched over my images, so when someone right-clicks on them, they just save the transparent gif, instead of the picture.
yes, but they can still get at the picture once they figure it out, just go Right Click > Save Background as or go to the source and find the file, not to mention a simple Print Screen.
I almost always put javascript in an include so that it can’t be seen. Not because my code is clever and unique, I just don’t want people seeing what a mess it is.
How do you do this?? By putting it in an external .js file? Because I can still view that once I find which file it is.
Nothing spells “U N P R O F E S S I O N A L T E E N S I T E !” to me as a no right click javascripts or ridiculous idiotcal crap like that.
If you don’t want your source stolen don’t put it on the web. Done deal. If you put it on the bweb don’t annoy the visitors, you’re not going to get anything out of it. Anyone who wants your html source and images will get them. Your baby “protections” just makes more people wonder what you’re hiding and look for it better.
Include via javascript? Ok fine, I’ll just download the .js to my harddrive and view it. “shift scramble” your source with js? Good, you alienate non javascript enabled visitors for me to take extra 5 secs to remove your javascript or write it’s counteropposite. Another layer over images? If you do that I’ll save your images on purpose no matter how useless they may be - view source, get url, download. I’m bored and I feel all the above ways are just too easy? I’ll look up the file and it’s source in my browser cache. If you place it online you can’t prevent it from being downloaded, get over it.
Originally posted by jenschuster
If they can’t right click, then how would they get at them?
Turn off javascript. View the source and look at the filename and access the image directly.
oh just be a big mean person like my skool and disable rightclick, the file tab, the C:\ drive, the shared I:\ drive, and other such and such. sigh. i find it more work to work on their computers than any other classroom
Not to mention the fact that by loading a webpage a cached copy is kept in the temporary folder and everything can easily be gotten from there.
I won’t even stay on a site that has right click disabled. I use it to pop up new windows, view properties and other stuff…
Man, that crap’s annoying
Hi
I’m new around, but here it goes my contribution
You can’t hide the source of you page, but you can make it dificult and so hard to read that unless somebody realy loves you site, wouldn’t bother to get it. Just remove the new lines and carriage returns and make it a long single line, including the java if any. The browser doesn’t care about new lines…
Originally posted by jenschuster
If they can’t right click, then how would they get at them?
Take a screenshot using the Print Screen button on your keyboard and paste and crop accordingly
you could have hit CTRL+N to open the page in a new normal window (complete with menus, buttons, etc). or maybe you could have selected the text and hit CTRL+C ?
just thoughts (but the CTRL+N one always cracks me up)