Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 2nd, 2005, 10:35 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default Can I disable View Source command in web browsers?

Can I disable View Source command in web browsers?


surendran
(Anything is Possible)
__________________
surendran
(Anything is Possible)
http://www.suren.info
http://ssuren.spaces.msn.com
  #2 (permalink)  
Old August 2nd, 2005, 10:43 PM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

No, you can only annoy people while trying.

(o<
//\ =^..^=
  #3 (permalink)  
Old August 2nd, 2005, 10:52 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

how?

surendran
(Anything is Possible)
  #4 (permalink)  
Old August 3rd, 2005, 09:33 AM
richard.york's Avatar
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
Default

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
  #5 (permalink)  
Old August 5th, 2005, 05:17 AM
Friend of Wrox
 
Join Date: May 2004
Location: , , .
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

  #6 (permalink)  
Old August 5th, 2005, 08:50 AM
richard.york's Avatar
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
Default

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
  #7 (permalink)  
Old August 5th, 2005, 10:50 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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

And since when did anyone
?



--

Joe (Microsoft MVP - XML)
  #8 (permalink)  
Old August 5th, 2005, 12:13 PM
richard.york's Avatar
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
Default

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
  #9 (permalink)  
Old February 19th, 2007, 01:56 PM
Authorized User
Points: 56, Level: 1
Points: 56, Level: 1 Points: 56, Level: 1 Points: 56, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2007
Location: Vashi, Maharashtra, India.
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
  #10 (permalink)  
Old February 21st, 2008, 05:14 PM
Registered User
 
Join Date: Feb 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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".

Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert command in grid view sumit_0 ASP.NET 2.0 Basics 1 April 26th, 2008 05:05 AM
disable VIEW SOURCE in MSIE crmpicco Javascript How-To 24 March 1st, 2008 03:45 PM
Disable View>Source (disable html source) kazmughal44 HTML Code Clinic 11 December 11th, 2007 11:53 AM
HTML - no View Source GreenLamar HTML Code Clinic 1 August 9th, 2007 03:19 PM
Disable - View Source in Menu Bar VikramMullick Javascript 1 March 22nd, 2006 05:40 PM



All times are GMT -4. The time now is 06:29 AM.


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