SeOpt Internet Marketing

Call: (713) 518-2159
e-mail: sean@seopt.com

Blog

  • Home
  • About
  • Search Engine Optimization
    • Local Houston SEO
    • PPC Campaigns
    • Houston SEO Consultant
  • Site Design
  • Social Media
  • Contact
  • Blog
  • Resources
    • Local Citations
    • Good Reads
    • General Directories
Home › Blog › The Problem with Frames
Aug14
Sean Odom
Blog
2 Comments

The Problem with Frames

What are Frames?

A generic framed page looks like this.

Frames allow a webmaster to load pages into windows or "frames" of a main "frameset page" while leaving other windows or "frames" in the pages unchanged. One of the biggest advantages of frames was the fact that a navigation bar or a header could exist in just one file. Therefore, to do changes on the navigation bar, a webmaster could change just the navigation bar file. (In non-frame pages the navigation bar is often coded into every web page, making changes more time-consuming because each navigation bar on each page of the website must be modified to change just one navigation link.)

We say this was the advantage of frames because server side includes (SSIs) now solve this problem without some of the optimization problems associated with frames. Almost anything that can be done in frames can be done in other ways. In our opinion, frames are now obsolete.

However, if you really must have a website in frames, there are ways to optimize the site.

The Problem with Frames

There are several problems associated with frames. To understand these problems, lets take a look at what a search engine sees when it looks at a framed web page.

For our generic framed page, the search engine sees the following code:

Main Code For A Generic Framed Page

<html>
<head>
<title>Framed Page</title>
</head>

<FRAMESET COLS="15%, 85%">

<FRAME SRC="navbar.html" name="navigation">
<FRAME SRC="homepage.html" name="main">
</FRAMESET> 
</html>

Although the website viewer sees the pages’ text, the search engine sees only this code. Worse, search engines don’t understand the frame tags and can’t follow the links in the frames. So it can’t get to any of your web pages.

No text. No links. No rankings.

Adding a good title and some META tags couldn’t hurt, but it can’t be the end of your solution.

The NOFRAMES Tag

The first step to optimizing with frames is to include a useful NOFRAMES tag. This tag was originally introduced because older browsers couldn’t view frames. Therefore, most NOFRAMES tags read something like:

"You have a browser older than dirt. Get a new one!"

Together with the old code, this looks like this to search engines:

Main Code For A Generic Framed Page with NOFRAMES Tag

<html>
<head>
<title>Framed Page</title>
</head>
<FRAMESET COLS="15%, 85%">

<FRAME SRC="navbar.html" name="navigation">
<FRAME SRC="homepage.html" name="main">
</FRAMESET> 
<NOFRAMES>
<BODY>
<P>You have a browser older than dirt.  Get a new one!</P>

</BODY>
</NOFRAMES>
</html>

This is all fine and dandy if you want to rank under a browser older than dirt. But that was probably not what you had in mind. Plus, the search engines still can’t follow any of your links. So they can’t get to any of your other web pages.

You can solve both these problems in one deft sweep. Add good spider-content and actual links to your NOFRAMES tag. Like this:

Main Code For A Generic Framed Page with SEO-friendly NOFRAMES Tag

<html>
<head>
<title>
Framed Page
</title>
</head>

<FRAMESET COLS="15%, 85%">

<FRAME SRC="navbar.html" name="navigation">
<FRAME SRC="homepage.html" name="main">
</FRAMESET> 

<NOFRAMES>
<BODY>

<P>
We are the best widget makers ever! We make red, green and blue widgets like you wouldn’t believe!</P>

<a HREF="homepage.html">Home</a><br>
<a HREF="aboutus.html">About Us</a><br>
<a HREF="contactus.html">Contact</a><br>

</BODY>
</NOFRAMES>

</html>

That’s better, but there is still one problem…

Loading Web Pages in Frames

Now we have another problem. To understand this, lets follow the link that the spider has followed to our first link: homepage.html.

Click Here To See How Google Sees Our First Linked Page

So what’s the problem?

Since the spider sees the page without the frames, it doesn’t see the left navigation bar. Since you already included all the links from the navigation bar in the NOFRAMES tag, this may seem unimportant. However, the problem is, it will also list your page without the navigation bar.

That is, now, when a viewer clicks on your site in your search engine listing, it will load without the frames. Since your navigation bar (and possibly your header and other important information) is located in your frames, this is bad.

How to fix this?

There is a quick fix and a long fix. The quick fix is to include this code in all pages that you want to load inside your main frame-set page:

<script language="javascript">
if (top == self)
self.location.href = "framedpage.html";
</script>

This code checks to see if a browser has loaded your page without the frames, and, if so, redirects the browser to the starting main frameset page of your site.

The code goes between the </head> and <body> tags. We have used this code on our About Us page of our generic site. The code for the About Us page looks like:

Main Code For A Generic Framed Page with NOFRAMES Tag

<html>
<head>
<title>
About Us</title>
</head>


<script language="JavaScript"> 

if (top == self)

self.location.href = "framedpage.html"; 

</script>


<body>

About us page.
</body>
</html>

Remember that if you use this code for your own pages, you should substitute the name of your main frameset page for "framedpage.html."

Now, our About Us page loads like this from a search engine listing.

But…wait….

That isn’t our About Us page. That loads the homepage.

Like we said, there is a quick fix and a long fix. This quick fix always redirects the viewer to the homepage if the page is loaded from a direct link and not from a regular link within your framed site.

There is a way to ensure that the correct page is loaded from search engine listings and other direct links.

The following article explains this more involved process. Finding Parents for Orphaned Pages.

Sean Odom
About The Author:

Sean Odom is the founder of SeOpt Internet Marketing, a Houston SEO services provider. Sean is also co-founder of Socialot.com, a SAAS social contact management system for small businesses.

seo
Related Posts
  • SEO Guide
  • Google Business & Site Owner Help
  • Simple 301 Redirect Instructions
  • SEO Glossary & Definitions

2 Comments

    Recent Posts

    • Questions About Web Crawlers, Robots, Spiders
    • SEO Guide
    • Google Business & Site Owner Help
    • HTML Validation
    • Simple 301 Redirect Instructions
    • How To Use a Robots.txt File
    • SEO Glossary & Definitions
    • Flash Search Engine Optimization
    • Increase Website Conversion Rates
    • The Problem with Frames

    Recent Comments

    • Search Engine Friendly Website Design - SeOpt SEO Blog on SEO Guide
    • Keyword Rich Anchor Text, Optimizing Heading Tags & Page Naming on Search Engine Marketing
    • Google Webmaster Guidelines For SEO's - SeOpt SEO Blog on W3C HTML Validator
    • Link Building - How To Build Quality Backlinks - SeOpt SEO Blog on Search Engine Marketing
    • Keyword Analysis & Targeting Competitive Keywords - SeOpt on PPC Campaign Management

    Archives

    • February 2015
    • February 2013
    • January 2013
    • December 2012
    • November 2012
    • October 2012
    • August 2012
    • July 2012
    • May 2012
    • June 2011
    • April 2011
    • September 2009
    • April 2009
    • October 2007
    • August 2007
    • December 2006

    Categories

    • Blog

    Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

    Get In Touch

    SeOpt, Inc.
    24044 Cinco Village Center Blvd
    Suite #100

    Katy, TX 77494
    (713) 518-2159
    sean@seopt.com
    URL of Map
    Monday-Friday 9am-5pm
    Saturday 11am-3pm

    Site Navigation

    • Home
    • About Us
    • Contact Us
    • Search Engine Optimization
      • Local Houston SEO
      • PPC Management
      • Houston SEO Consultant
    • Site Design
    • Social Media
    • Blog
    • Privacy
    • Sitemap

    Partners

    • The Writers For Hire
    • Zephyr Salvo
    • ChiliPepperWeb.net

    Recent Posts

    • Questions About Web Crawlers, Robots, Spiders
    • SEO Guide
    • Google Business & Site Owner Help
    • HTML Validation
    • Simple 301 Redirect Instructions
    Copyright © 2013 SeOpt.com Internet Marketing - All Rights Reserved www.seopt.com