|
How can I protect my Web site graphics?How can I protect my website html pages, graphics, etc. from being viewed, and/or manipulated by casual viewers? IOW, what do I need to set up so that if someone tries to go to "www.mysite.com/pics" (for example), they would get a "no permission" message? There are two ways I can try to answer your question, actually. There's the far more complex question of how do you protect the content of your pages from prying eyes, and there's the simple question of how do you make it so people can't browse your "images" or "pics" directory. Let's start with the first one. The essentially answer is that you cannot prevent people from manipulating your page, viewing the source HTML, JavaScript, CSS, etc., and even right-clicking on a graphic and using "Save Image As..." to grab a copy of what you have. There are ways you can make it more difficult, including a common snippet of JavaScript code that disables the right-click feature while someone is on your page, but as with everything else that the Web site developer lives with, this is a case of "it's up to the browser". Specifically, if you can get something to appear on someone's screen, then they can take a screenshot, scrape the site with an archive program, or even browse their Web browser cache to get a copy of the image. For that matter, they can also ascertain the URL of your image and just reference that in an img src tag! Here's a simple right click disable JavaScript snippet, by way of example: <script language="Javascript1.2">
alertMsg = "Right-clicking on this page is disabled!"; browserVersion = parseInt(navigator.appVersion) function noRightClick(evnt) { document.onmousedown = noRightClick; </script> So that, as I said, is the complex half of this question. The simple half is, well, simpler! If you want to prevent people from browsing your "pics" folder, simply create an empty file called "index.html" and drop it in that folder. If someone tries to browse the folder, they jsut get a blank page, but you can manipulate its contents to your heart's content using sftp or ftp. Hope that helps you out!
Categorized:
HTML and CSS
(Article 4204,
Written by Dave Taylor)
Tagged: Previous: How do I export MP3 files from iTunes? Next: How do I use IRC on a Mac? Subscribe!
Another thing to do is to disable the directory listing in the web server software. Not everyone will have system administrator priviledge to do that, but if you do, it's a really simple setting. Disabling right click with Javascript is, in my opinion, an obnoxious nuisance! For instance, if I click the middle mouse button to scroll with Firefox, I get the "no right-click" popup. It's more useful for the site designer to disable hotlinked images than to prevent direct viewing of them. Just my two cents. Posted by: Chris Hepner at October 21, 2006 6:00 PMhttp://ankurkhetrapal.com/blog/2008/01/12/protecing-your-images-on-the-web/ the author has discussed some neat methods to make image theft inconvenient Posted by: chris at March 7, 2008 4:41 PMHi...how can i protect my blog photo and details from being copying by people?As i know microsoft internet explore have the security to protect blog from stealling by people,when the person right-click the mouse microsoft internet explore will show up a triangle yellow warning written the words "NO STELLING". Can i know how to put this microsoft internet explore warning in my blogger?Please help... Posted by: Rachel at September 6, 2008 11:27 AMthank you very much for your valubale coments Posted by: SANJEEWA JAYASURIYA at April 12, 2009 6:09 AMIS there no way I can restrict users to look at the images directly from folder. Posted by: Alok Kumar at March 31, 2010 4:00 AMActually, Alok, there is. Just create an empty "index.html" (or the equivalent for your particular Web server configuration) and drop it in the images directory or folder. That should do the trick! Posted by: Dave Taylor at March 31, 2010 6:25 AMHi, I am wanting to prevent the iPad users from being able to select images from my site and using the Save Image option (when they press finger down for 3 seconds on image) I have managed to prevent the cut/copy of text with -webkit-user-select: none; but require an option to disable the image selection from the ipad. I have something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
Recommended
Recent Entries
Search
I Need Help!
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and RSS Feeds Building Web Site Traffic Business and Management CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above Facebook Help Google Plus Help HTML and CSS Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Mac OS X Help Pay Per Click (PPC) Advertising Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help WordPress Help |