View Single Post
Old August 5th, 2005, 08:50 AM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

It isn't that the question has been covered a bagillion times already, but that common sense dictates that it isn't really possible in the first place. Think long and hard about it. How many mainstream corporate websites do you find this "feature" on. If anyone would want to hide code, it would be a commercial entity. You don't see it on places like and because it's futile to even try to mask your source code. Oh, so you've disabled view source? Well, I'll just use the "save page as" feature. And guess what- it saves all linked files too. That's not to mention all the other ways of getting around it. The browser cache. Disabling scripting. Just going straight to "view source", using the command line to download directly, opening the page with scripting of some kind, etc, etc.

If you're really worried about your javascript, use an obfuscator like this one: But even with that, it can be reverse engineered easily (he even provides that in that tool there). It may just be my opinion, but there isn't anything on that page worth protecting even. Pretty common stuff. The biggest tragedy here, is what I mentioned in the other thread. You're only going to annoy your users! How is that going to help you sell a product, or bring visitors to your site? From my own experience, encountering such a site just makes me click the back button and go somewhere else (usually at the point when I try to access the "back" button from the contextmenu, which to my utter annoyment, has been disabled!). No one cares about your images. We can get all the images we want from google's image search, and searches like it. You're treating your customers/users like criminals. How many people in the market for a cell phone are going to give a rat's hoot about downloading your images or source code (which they have already done, BTW, simply by clicking on your URL!)?

That's just my opinion anyway.


Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design