Using frames effectively requires more than just knowing the HTML tags
Designing a web page to be part of a framed document doesn't guarantee that it will always be viewed that way. Keep in mind that some users might end up looking at one of your pages on its own, out of the context of its frameset (this is possible if a search engine returns the URL of the content, for example). Since frames are often used for navigation, this orphaned content page could be a big, fat dead-end for a user.
For that reason, you should try to design your content pages so that they stand up on their own. Adding a small amount of redundant information to the bottom of each page can make a big difference in usability. First, indicate the name of the site with a link to its home page on each content document. This helps to orient a newcomer who may have just dropped in from a search engine.
It is important to pay particular attention to the navigational options available on content pages viewed without their frameset. At the very least, provide a small link on every page to a more appropriate (and framed) starting point, such as the top level of your site. Be sure to set the target="_top" attribute so the link won't load the home page frameset within the current frameset.
In most cases, it is not appropriate to load whole external sites into the context of another framed document. By default, any link within a frame loads the new document into that same frame. To prevent external links from loading into the current frame, be sure to add target="_top" to all your external links; the new site will open in the full browser window. As an alternative, set the target to "_blank" to open the link in a new browser window.
Helping Search Engines
Search engines all work differently but pretty much uniformly do not understand frames or any content within a <frameset> or <frame> tag. This means search engines will not find any links that require burrowing through a site for indexing purposes, and all the content of your framed site will be missed.
There are a few measures you can take to make your site more friendly to search engines:
Loading Two Frames from One Link
Loading a framed document
In HTML, you can only load one document with a link, and that document can occupy just one window or frame. Loading two or more frames (essentially two documents) with a single click requires a bit of fakery. What you're actually doing is loading a single document that is divided into frames itself. What the user sees is a number of frames being replaced at once.
This effect cannot be achieved by nesting framesets as shown in Figure. Instead, the nesting happens as a product of a framed external document loading into a single frame.
For instance, the following code creates a frameset with two frames: a narrow "top" frame and a "main" bottom frame. This frameset is called top.html.<FRAMESET ROWS=50,*><FRAME SRC="toolbar.html" NAME="top"><FRAME SRC="two_frames.html" NAME="main"></FRAMESET>
The bottom frame displays the contents of a document with two vertical frames called two_frames.html, shown here:<FRAMESET COLS=250,*><FRAME SRC="left.html" NAME="leftframe"><FRAME SRC="right.html" NAME="rightframe"></FRAMESET>
It is assumed that there are a number of documents like two_frames.html that can be accessed by links in the top frame. Each link from the top frame loads one document in the "main" frame, but the contents of two frames change at once.
Of course, this method works only for neighboring frames.
Another (and more robust) method for changing two frames with one click uses a function that changes the contents of two frames (named "toolbar" and "main"), as shown in this sample code:
Faking an <iframe>
Inline (floating) frames are really cool, but unfortunately, they are not supported in all browsers (Navigator 4.7 and earlier lack support). The following code gives the effect of an inline frame using standard frames tags (but, of course, without all the text-wrap functionality). It creates a scrolling frame that is always centered in the browser window, regardless of how the window is resized, as shown in Figure.
Figure: Scrolling frame centered in the browser window
The middle column setting in the first <frameset> is the width of the window in pixels. The middle row setting in the nested <frameset> gives the window's height. You can change the size of the window by adjusting these settings. You can also set the scrolling function of the frame in its <frame> tag.
In this example, all the remaining frames are filled with an HTML file with no contents and a black background. Of course, these frames could contain actual content as well.
Frame-Proof Your Site
Preloading Images with Hidden Frames
"Preloading images" refers to methods used to download images and store them in the cache before they actually need to be displayed on the page. One method for doing this is to place all the images you'd like to download in a framed document that is hidden from view. The images download and are cached when the first frameset is loaded, but they won't be seen until the user links to a visible page that includes them.
The trick is to create a frameset with two rows (or columns). Set the size of the first row to 100% -- this is the frame that will be used to display your first page. In the second row, the one that gets squeezed out of existence, specify the document that contains your images.
You can put a bunch of images there, but keep in mind that it's not a free download, just a predownload, so all the same rules about minimizing file sizes apply. There's always the chance that the user might request one of the images (via a link or by moving to a web page that contains it) before they've all arrived.
Frames in WebTV
While WebTV technically supports frames (i.e, it can display the information in a framed document), it does so by converting the framed document into a large table. Each "frame" (more like a table cell) displays the entire contents of the frame source. If a frame contains an HTML document that is quite long, the resulting "frame" in WebTV will be extended to display the entire file, regardless of the specified frame size. There is no scrolling function in WebTV.
In addition, WebTV "frames" do not remain in a fixed position like normal frames, but instead move off the screen when users page down through the content.
Keeping Pages in Their Frames
The first line of the script checks to see if the topmost frame of the current window is the document. If it is, the second line of the script instructs the browser to replace the document with the frameset document (frameset.html in this example, but fill in your own file name in this location).
1Frame Sizes in Netscape Navigator
Some framed page designs rely on precise pixel measurements to achieve a desired effect. While Internet Explorer (all versions) and Netscape 6 do not have a problem rendering frames with pixel accuracy, this is not the case for Netscape Navigator Versions 4.7 and earlier. They handle frames in a way that makes it nearly impossible to get the frame sizes you specify.
The reason is that Navigator's frame code (developed way back for Version 2.0) records all frame dimensions in percentages. Any pixel measurements provided in the rows or columns attributes are calculated as a percentage of the available screen space and then rounded off to the nearest percentage point. The rounding results in the rendered frame being up to 12 pixels different (usually smaller) than the specified size. If alignment is crucial for your design, 12 pixels of shift may be unacceptable.
On the bright side, this problem was fixed in Netscape 6, and the older versions of Navigator make up an ever-diminishing percentage of overall browser use. Eventually this will be a non-issue, but in the meantime, just be aware that if your frames are misbehaving, it may be Navigator and not your code that's to blame.
Web Designing Related Interview Questions
|HTML Interview Questions||HTML 5 Interview Questions|
|Flash Interview Questions||Graphic Design Interview Questions|
|Illustrator Interview Questions||Dreamweaver Interview Questions|
|UI Developer Interview Questions||Dreamweaver CS3 Interview Questions|
|CSS Advanced Interview Questions||Web Developer Guide Interview Questions|
|Log Shipping Interview Questions||Spring Boot Interview Questions|
|UI Designer Interview Questions||Bootstrap 4 Interview Questions|
Web Designing Related Practice Tests
|HTML Practice Tests||HTML 5 Practice Tests|
|Flash Practice Tests||Graphic Design Practice Tests|
|Illustrator Practice Tests||Dreamweaver Practice Tests|
|UI Developer Practice Tests||Dreamweaver CS3 Practice Tests|
|Web Developer Guide Practice Tests||Advanced jQuery Practice Tests|
Web Designing Tutorial
Designing For A Variety Of Browsers
Designing For A Variety Of Displays
Web Design Principles For Print Designers
A Beginners Guide To The Server
Printing From The Web
Structural Html Tags
Adding Images And Other Page Elements
Specifying Color In Html
Cascading Style Sheets
Server Side Includes
Designing Graphics With The Web Palette
Audio On The Web
Video On The Web
Flash And Shockwave
Introduction To Smil
Introduction To Dhtml
Introduction To Xml
Wap And Wml
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.