p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   HTML Code Clinic (http://p2p.wrox.com/forumdisplay.php?f=90)
-   -   Can I disable View Source command in web browsers? (http://p2p.wrox.com/showthread.php?t=32094)

surendran August 2nd, 2005 10:35 PM

Can I disable View Source command in web browsers?
 
Can I disable View Source command in web browsers?


surendran
(Anything is Possible)

meow August 2nd, 2005 10:43 PM

No, you can only annoy people while trying.

(o<
//\ =^..^=

surendran August 2nd, 2005 10:52 PM

how?

surendran
(Anything is Possible)

richard.york August 3rd, 2005 09:33 AM

Ah, the weekly "How do I disable view source?" question.

You can't. If you don't want people to view the source of your document then don't post it on the internet.
http://p2p.wrox.com/topic.asp?TOPIC_ID=32294

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design

interrupt August 5th, 2005 05:17 AM

Perhaps you can put a notice in the Sticky Post Richard stating that this question is covered a million times already?


richard.york August 5th, 2005 08:50 AM

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 microsoft.com and amazon.com 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: http://dean.edwards.name/packer/. 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.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design

joefawcett August 5th, 2005 10:50 AM

There's no need to *****-foot around Richard, just tell it to 'em straight :)

And since when did anyone
?



--

Joe (Microsoft MVP - XML)

richard.york August 5th, 2005 12:13 PM

Yes, just as utterly pointless as attempting to disable view source in a web browser. ;)

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design

amitavroy February 19th, 2007 01:56 PM

you cannot hide, the html code i guess but yes you can encrypt it so that the person can see all crap insted of the code.
Regards
Amitav Roy
Website: http://www.pixelgroups.com
Blog: http://design.pixelgroups.com

Regards
Amitav Roy
Email: amitavroy7@gmail.com
Web: http://www.pixelgroups.com
http://www.pixelgroups.co.nr

Blog: http://weandgraphic.blogspot.com

kkp40 February 21st, 2008 05:14 PM

I would be very happy if we could bet up every one that to this question gives the "smart ass" answer "Don't put in on the internet".



All times are GMT -4. The time now is 09:26 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.