The Two Biggest Problems with Frames


Mention frames to any Web site developer, and you'll be sure to get an earful. Good or bad, people always have an opinion. You've already seen how useful they can be at providing navigational information, but let's see why so many people dislike them.

Tip

Jakob Nielsen, one of the Web's most respected usability experts, maintains a Web page called (and pardon my French), Why Frames Suck (Most of the Time), in which he discusses some of the many problems users have with frames. You can read his original 1996 article at www.useit.com/alertbox/9612.html, which was later updated in 1999(http://www.useit.com/alertbox/990502.html). Though not a recent article, the concerns he raises are still valid today.


So Many Pages, So Few URLs

When you load your frameset document into your browser, you are telling the browser to load all the pages into this same document, following the selected hyperlinks. So? Take a look at the URL for your frameset document. My URL is C:\Webshare\wwwroot\sams\frame2.htm. No matter how many times I click the hyperlinks in my framed pages, the URL stays the same because all those framed pages are loading into the same frameset document.

Why is that a problem? Suppose that my best customer is browsing my site and she is looking at the wonderful information on Page4.htm. She decides to save the URL in her Favorites (or bookmark it) so that she doesn't have to search for the information again. The URL she saves is C:\Webshare\wwwroot\sams\frame2.htm, not C:\Webshare\ wwwroot\sams\page4.htm, which is what she was actually looking at. There is no guarantee that when she opens that URL in the browser, it will open on Page4.htm, as she wanted in the first place. How frustrating!

If you right-click the mouse (or hold the mouse button if you have a Macintosh), you can click Properties in the shortcut menu. On the Properties dialog box is the URL for that particular page (see Figure 10.7). You can highlight and copy that URL into the Address field of your browser to open later. When you do this, however, you will not see the framed version of the site; you will only see the single document that you saved, with no additional navigation to help you.

Figure 10.7. The Properties dialog box contains the actual URL for a framed page. You can copy the URL using the shortcut menu after you highlight the text.


Printing

Another huge problem for users of your framed Web site is printing. Why should printing be a problem? As much as we like to think that we are headed toward paperless offices and online commerce, people still like to print documents. When most people see a page that they want to print, they click the Print button on their browser. With older browsers, the Print button only prints the active frame.

Active Frame

The last frame that you clicked.


On my sample framed site, if you clicked a link in the left frame to open a new document in the main frame and then clicked the Print button without making any other mouse clicks, you would actually print the navigation bar on the left frame, not the document in the main frame that you wanted. Unfortunately, the browser doesn't know which frame you want, only which frame was last active.

The newer browser versions have included a new feature in their Print dialog boxesa Print Frames option that allows you to specify whether you want to print the active frame or the entire frameset (see Figure 10.8). A big improvement, but you can't guarantee which browser your visitor is using.

Figure 10.8. The Print dialog box from Internet Explorer.


Tip

If you want to print a single frame, you can click the right-mouse button, or hold down the mouse button if you are using a Macintosh, and select the Print option from the shortcut menu. The printer will print only the selected frame, not the entire frameset.




Sams Teach Yourself HTML in 10 Minutes
Sams Teach Yourself HTML in 10 Minutes (4th Edition)
ISBN: 067232878X
EAN: 2147483647
Year: 2004
Pages: 151
Authors: Deidre Hayes

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net