The Technofile Web site has moved.


Technofile is now located at http://twcny.rr.com/technofile/
Please update your links, bookmarks and Favorites.  
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 

Browser tips 1: View the source code when things don't work right
technofile  by al fasoldt
Columns and commentaries in a life-long dance with technology 
Simple gray rule


Browser tips 1: View the source code when things don't work right 


Bit Player for Oct. 5, 1997

By Al Fasoldt

Copyright © 1997, The Syracuse Newspapers

When you need to know something, you go to the source, right? You can do that when you are browsing, too.

The "source" I'm referring to is hidden in the Web page you're viewing. You don't see it because the browser reads the source code and does its best imitation of a quick-change artist. In a fraction of a second, the drab source code is turned into a stunning Web page.

The code browsers interpret to display everything you see is called HTML—"hitmill," if you want to pronounce it, or "just H-T-M-L" if you're old fashioned. It stands for hypertext Markup Language.

But I'm not trying to get you to dig into HTML and learn how to program Web pages. I'm suggesting that the source code for Web pages can be very helpful when you run into problems trying to reach a Web site. Or when you can't seem to get your browser to cooperate any time you're trying to download a file.

That's because the source code—written in plain-old-everyday English, with some easy-to-follow commands stuck between angle brackets—contains the real address of every link you see on a Web page. Usually, the hyperlinks you see on a Web page have what programmers love to call "friendly names"—names that are easy to understand. But the code underneath those "friendly names" is a lot more useful.

Here's an example. On a Web page I would create, I might have an underlined (or colored) link to Microsoft's site," reading something like this: "For more information, visit Microsoft's site."

The code for that sentence would read like this:

For more information, visit <A HREF="http://www.microsoft.com/">Microsoft's site</A>

Easy, right? The address is right there, between quotation marks. If the link in my Web page didn't work for some reason, you could steal the real address right from the code—you could cut it and paste it, maybe—and put it into the address line of your browser.

And you can do other tricks, too, which we'll get to shortly.

But how can you pull off this maneuver to start with? How can you peek at the actual Web-page code?

Easy. You can either use the "View Source" menu option in your browser or you can save the Web page as HTML and then do a drag-and-drop operation, popping the page into your favorite text editor. "View Source" is the handiest way, so try that first.

Did I say other tricks? You bet. Here's my favorite.

Sometimes my browser just refuses to pick up a file I'm trying to download. That seems to happen most often when the file is located on an ftp server. In those cases, I get an "extended information" message. (It doesn't mean anything special. It's just the browser's way of saying, "Duh, I give up.")

So I view the source, stick the address of the file in the clipboard (I highlight it, then use the "copy" command or just press Ctrl-C in Windows), then run my ftp program and paste in the address of the file. The ftp program goes and gets it every time.

Another neat trick: Sometimes links don't work because there's a typographical error in the code. The error can be as simple as a space in the address. (That's a no-no in URLs.) So I view the source, try to find the typo, fix it, then load the fixed page back in my browser with drag-and-drop. Then the link works fine.

Stay tuned for more tricks next week.


 Image courtesy of Adobe Systems Inc.technofile: [Articles] [Home page] [Comments: afasoldt@dreamscape.com]