Changing MSIE’s View-Source Default Editor

15 09 2010

As, a PHP Developer, what do you do if you need to view the HTML source for a webpage? You could write a program using PHP’s file_get_contents() but sometimes you just want the convenience of manually viewing the source by issuing some quick keyboard or mouse commands to the browser. Normally, when you do so with MS Internet Explorer (MSIE) browser, you can expect that action to result in Notepad launching and revealing the HTML source code. That’s true most of the time.

Recently, I discovered a computer that had been configured so that a different software program launched. In this particular case, it was one of those 30 day trial freebees and the trial was definitely done. As soon as the program launched, a dialog opened asking whether I wished to purchase the program and when I declined, the application closed, of course — very frustrating!

To resolve this matter, I knew that I had to somehow restore NotePad as the default View Source application, but how was the question. I read online that for the browser version in question, namely MSIE (6.x+), the View-Source application is determined by a Windows Registry setting. Great, just what I always wanted, to mess with the Registry 😉 From what I read, it appeared that the only solution was to edit the Registry setting. Now, I’m brave when it comes to working with PHP and Open Source technologies but the Windows Registry I’ve learned is a place where one needs to tread very carefully.

The trial version software when it was installed included functionality to actually get into the Registry and make itself the default View-Source editor. So, logically, one must wonder whether there is a software option that would allow one to restore Notepad as the editor by editing the Registry for you? Note, this too could be a risky choice. Luckily Windows XP will do this for you, so the risk should be minimal or at least that has been my experience to date.

As a Windows XP user, all I had to do was go to Start->Settings->Control Panel and select “Add or Remove Programs”. What happened next was as expected, just about every program running on the computer appeared in a listing. I went down the list and highlighted the trial editor and indicated that the program should be removed from the computer. Once that program vanished, the Registry setting reverted back to Notepad — Yay!

If you use MSIE 8, you’ll find that it is much more comfortable to change the View-Source editor by using that browser’s “Developer Tools”. Go to Tools->Developer Tools. Then select on the File menu, “Customize Internet Explorer View Source” which allows you three choices, the default, NotePad or Other. For my own desktop, I’ve gone with the last option so that I could customize the browser to use NotePad++ (not a MS product — it’s free and is a greatly enhanced version of NotePad).

This work is licensed under a Creative Commons License



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: