homepage Welcome to WebmasterWorld Guest from 54.211.230.186
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Turning off View Source
Impossibility?
diaperfabricmom

10+ Year Member



 
Msg#: 778 posted 5:16 am on Feb 9, 2003 (gmt 0)

I've been to a handful of websites where when I click on the "view" button in my tool bar, the "view source" option is not an option. I can still read it, but it's not clickable.

I can't find any information on how to disable the option from the actual tool bar. Everything I've read says it's impossible, yet I've seen it in action.

I'm well aware that disabling a person to view the code is a controversial topic, this is not a discussion for that issue. I'm just wondering if anyone else as seen this or knows how to do it.

Thanks.

 

msr986

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 778 posted 5:22 am on Feb 9, 2003 (gmt 0)

AFAIK, you cannot disable this function.

> I've been to a handful of websites where when I click on the "view" button in my tool bar, the "view source" option is not an option. I can still read it, but it's not clickable.

I've never seen this, do you have an example?

You can "Sticky Mail" me the URL.

diaperfabricmom

10+ Year Member



 
Msg#: 778 posted 6:31 am on Feb 9, 2003 (gmt 0)

There were three sites, I believe. One of which I remember exactly & of course now that I go back the function is enabled. What on earth could it have been? I know I was completely coherent at the time... I even showed my colleague & we returned to the site several times that day to look at it.

What I do know is that all sites are hosted by godaddy.com. But no where on the site is any information as to whether or not, or how they disable the function.

::scratching my head::

Could it be merely that they are calling their page information from a different location than the domain/server?

cornwall

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 778 posted 8:43 am on Feb 9, 2003 (gmt 0)

Can you still not view the source by downloading it and looking at the site source on your own software?

stevedob

10+ Year Member



 
Msg#: 778 posted 9:21 am on Feb 9, 2003 (gmt 0)

This effect appears to be the result of the page adding a Restriction Policy to your Registry and, presumably, removing it on exit.

If you run a search on "function DisableViewSource" you should get a bit more info. There is a Delphi tools package, called IE5Tools, that details the particular registry setting required to achieve this 'effect'.

msr986

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 778 posted 9:23 am on Feb 9, 2003 (gmt 0)

> What on earth could it have been?

It could have been some phenomena on your local machine.

stevedob

10+ Year Member



 
Msg#: 778 posted 9:46 am on Feb 9, 2003 (gmt 0)

Having (thankfully) started on my 2nd coffee of the day, it would appear that a search on NoViewSource will throw up more info on how easy this effect is to achieve.

seindal

10+ Year Member



 
Msg#: 778 posted 10:07 am on Feb 9, 2003 (gmt 0)

While it might be possible to block things in MSIE, Netscape/Mozilla users will be mostly unaffected.

When people try to block right-click, I usually get a javascript warning the it has been disabled, but afterwards the menu pops up anyway, so it is not blocked.

There is no way to block View Source in Netscape/Mozilla, so these attempts at protecting the html source will only work against the very simplest attempts at copying.

Anybody with the slightest clue will be able to download any file whatsoever using the program wget and specifying the user-agent they want to fake.

René

stevedob

10+ Year Member



 
Msg#: 778 posted 10:16 am on Feb 9, 2003 (gmt 0)

The issue wasn't whether or not the stated effect is useful, sensible or secure, but HOW it is achieved. The answer to THAT question has been given above.

chiyo

WebmasterWorld Senior Member chiyo us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 778 posted 10:18 am on Feb 9, 2003 (gmt 0)

The web was designed for sharing, content and code, so that is why trying to do things like this is virtually impossible. Thats not to say anything you can see is available for copying illegally. Just because you can do it, does not make it legal (harkening back to the MP3 controversy)

In my view view source is a feature, not a problem! It helps people learn from others on how to display information to others. Of course, no matter it is easy to do, stealing creative property is just that - stealing! - so its there for people to learn from, but not copy and use for their own non-peronal uses. I would guess that most code behind webpages was originally copied from somewhere else anyway and then modified. Starting striaght from a HTML or other coding manual is pretty uncommon these days.

Of course best way of hiding code is by using service side scripting like php or cfm or whatever.

Agree with all the others. Those who relaly do want to see your code can do so just by downlaoding the page as html and viewing it in a text editor.

diaperfabricmom

10+ Year Member



 
Msg#: 778 posted 10:32 pm on Feb 9, 2003 (gmt 0)

cornwall:

Can you still not view the source by downloading it and looking at the site source on your own software?

Yes of course, that's not what I was inquiring about though.

Thank you stevedob:
The issue wasn't whether or not the stated effect is useful, sensible or secure, but HOW it is achieved. The answer to THAT question has been given above.

I realize everything you pointed out seindal & chiyo. This post wasn't about those issues, merely a curiosity for how the effect was acheived. Sheesh, I tried to be clear.

I'll do a search on the things you mentioned stevedob, maybe you should share some of your coffee with everyone ;)

amznVibe

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 778 posted 10:38 pm on Feb 9, 2003 (gmt 0)

That effect was an accident, not intentional. Internet Explorer has a bug if the page does not completely load properly, you cannot use "view source". If you refresh a few times and/or turn off your firewall filter you will eventually be able to view source.

keyplyr

WebmasterWorld Senior Member keyplyr us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 778 posted 12:19 am on Feb 10, 2003 (gmt 0)

Yes, I have seen several websites that disabled the View Source in the toolbar in IE and Netscape. Each time I noticed the little VM icon in my taskbar which leads me to believe that it's done with Java.

MWpro

10+ Year Member



 
Msg#: 778 posted 2:34 am on Feb 10, 2003 (gmt 0)

HTML will always be viewable, and it is pointless to waste time trying to get around it. Just accept this fact and you will be able to move foward and make good web pages. If you want a career or hobby in developing something that people cannot see exactly how you did it, you migh want to look into programming.

Now people will always be able to view your code, however if you want to prevent them from reading it accurately, you can always condense it onto one or two lines or something. I do not recommend this, however if you are that paranoid be my guest.

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 778 posted 3:18 am on Feb 10, 2003 (gmt 0)

stevedob already said this, but I'd like to restate it:

The issue wasn't whether or not the stated effect is useful, sensible or secure, but HOW it is achieved.

So, please, let's stay on the topic of this thread. There are several other threads that discuss the pros and cons of trying to hide source code. Thanks everyone.

chiyo

WebmasterWorld Senior Member chiyo us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 778 posted 4:20 am on Feb 10, 2003 (gmt 0)

so if somebody asks how to make viruses, we should tell them and not comment on how useful, secure, or sensible it is.

Garbage

stevedob

10+ Year Member



 
Msg#: 778 posted 4:31 am on Feb 10, 2003 (gmt 0)

There's a big difference between one, that is potentially destructive, and the other, which is a harmless irrelevance.

Working out which is which is left as an exercise for the reader :)

chiyo

WebmasterWorld Senior Member chiyo us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 778 posted 7:25 am on Feb 10, 2003 (gmt 0)

steve. I dont agree with you - I have better examples - but will not continue discussing as tedster has spoken!

diaperfabricmom

10+ Year Member



 
Msg#: 778 posted 7:32 am on Feb 10, 2003 (gmt 0)

Good grief.

I stated in my original post:

I'm well aware that disabling a person to view the code is a controversial topic, this is not a discussion for that issue. I'm just wondering if anyone else as seen this or knows how to do it.

I never once stated that I wanted to achieve this effect for myself. Why would I? Aside from the already well known facts that chiyo & MWpro have been so kind as to re-point out to me, my html is rudimentary at best & chock full of errors. Anyone is welcome to it. Perhaps the code-snatcher could correct it all & send it back to me so that my pages are viewable in all browsers? LOL.

Simply curious,
diaperfabricmom

bill

WebmasterWorld Administrator bill us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 778 posted 7:47 am on Feb 10, 2003 (gmt 0)

diaperfabricmom if I understand your question you wanted to know how to do this...it's generally accomplished with JavaScript. I wouldn't do this myself, but there are plenty of JavaScript sites out there where I've seen scripts that would do this.

chiyo

WebmasterWorld Senior Member chiyo us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 778 posted 2:38 pm on Feb 10, 2003 (gmt 0)

diaper.. good grief indeed. You asked how to do it. I told you thats is hard to do and the reason why, which should have been helpful. I also advised that you can use server-side scripting to do it. If you dont like a post, just ignore it.

Receptional Andy



 
Msg#: 778 posted 2:46 pm on Feb 10, 2003 (gmt 0)

I had this problem once with IE - it was due to the IE bug where viewing source breaks if you have too many temporary internet files, discussed here -

[webmasterworld.com...]

Believe it or not there are a great number of reasons why the IE view source button can break, withotu this being the intention of the page author - here's a pretty good breakdown of reasons:

[generation.net...]

djfixxx

10+ Year Member



 
Msg#: 778 posted 6:57 pm on Mar 4, 2003 (gmt 0)

You need to either reaffirm your system environment variables or create a new Temp file to right click and view source. Go to Environment Variables tab edit TMP C:\Temp to TMP C:\tmp. Make sure you create a folder called tmp on your c drive. You may have 2 temp files Temp and TMP edit either or both untill it works. you'll probably get it on the first shot.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved