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.
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?
Can you still not view the source by downloading it and looking at the site source on your own software?
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'.
> What on earth could it have been?
It could have been some phenomena on your local machine.
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.
While it might be possible to block things in MSIE, Netscape/Mozilla users will be mostly unaffected.
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.
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.
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.
|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 ;)
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.
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.
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.
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.
so if somebody asks how to make viruses, we should tell them and not comment on how useful, secure, or sensible it is.
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 :)
steve. I dont agree with you - I have better examples - but will not continue discussing as tedster has spoken!
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.
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.
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 -
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:
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.