Results 1 to 6 of 6

Thread: Navigation frame missing from search engines

  1. #1
    Join Date
    Dec 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Navigation frame missing from search engines

    Im finding that sometimes my site opens to just the information page, or the page set to display in the iframe if it is found through a search engine. Is there a script or code that will remind it to load inside the navigation frame set for that page?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Your question is unclear. It is very difficult to imagine what your website looks like from the very basic description. Please give more information, or, better, post a link.

    If your question is just about how search engines link to your website, I can answer that generally: an iframe includes a separate page within your page. It is like having two different webpages open in two different windows. The content will not be matched, so I am not surprised that search engines direct users to the content page rather than your home page.

    The solution? Don't use iframes. They're outdated and there are other options available. A templating system using a serverside language is one way to do it; or you could use a CMS (a little more powerful than a templating system). Or you could use Ajax (although that has its own potential problems for search engines).

    One option if you really want to keep the iframes would be to add Javascript to the page to redirect the users back to the main page. Basically, check if the top page is the main page; if not, redirect to it. It's not a great solution, but it can work.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Dec 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry, the page wasnt up yet. im not a wizard at writing websites. im using dreamweaver.

    Basically, the main navigation page is:
    http://www.starrwhitehouse.com/test/...-progress.html

    Within that is the project page:
    http://www.starrwhitehouse.com/test/progress.html

    An then within that is the project sheet:
    http://www.starrwhitehouse.com/test/...ss/edison.html

    Say if you were to Google Dominick Street Park, the project page would just come up, and not the main frames. is there an easy way to link them with a script?

    Also, would it be easy to convert to one of your above recommendations.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    As I said before, an iframe does NOT put the content of one page into the other, in a technical sense. They are two entirely separate webpages, in the same way that they are two entirely separate files. And that is how a search engine sees them. Unfortunately, that is just a limitation of search engines as far as I know.

    It is possible to prevent a search engine (search for "robots.txt block"), but that would mean they could not see the content in the iframe at all, not that they would see it instead in the main page.

    Using a serverside language like PHP really is the best option, but unfortunately that's not necessarily easy. It's not horribly difficult although it could be confusing at first. I recommend taking it slowly and if you have time for the project it's a good way to do it. If you're in a hurry, maybe hiring someone for this project is a good idea. You can ask in the paid work requests section. (I could do this for you, but my schedule is full and I can't take on new projects at the moment.)
    Here are some recent discussions related to this that show what you'd need to use to approach this. PHP is one option, but any serverside language can function:
    http://www.dynamicdrive.com/forums/s...ad.php?t=66475
    Or here is a discussion involving both SSI and PHP (either one would work) including some sample code in one of my posts for easy to use PHP.
    http://www.dynamicdrive.com/forums/s...ad.php?t=66506

    There aren't any scripts that would "link" these or any that could replace the system, except Ajax. Ajax is a good option for presentation, but unfortunately because it's entirely based in Javascript search engines can't see that content either, so it's no more useful than iframes. You'd need a serverside backup for that method to work for search engines too.

    One potential solution is a feature in Dreamweaver. As a general comment, I usually warn against using a WYSIWYG (preview based) editor to generate code because the odds of generating either nonstandard or even broken code are high.
    But if you do want to use Dreamweaver, you can create some sort of templating system. I haven't used that in about 8 years, but from what I remember you can setup shared objects in DW that will be automatically used to generate pages on which you can change specific content. Basically, it's an efficient way to have DW cut and paste layout for you onto different pages, all while maintaining the ability to edit the template in a way that will be transferred to all pages. It's not a perfect solution (since it requires manual reuploading of all the pages and the problems inherent with relying on DW), but it will completely fix the iframe issue if it works since the content of each page will then truly be on each page.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Dec 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So ive been trying out two different scripts

    HTML Code:
    var websiteURL = 'http://www.starrwhitehouse.com/';
    var framesetString = 'starrwhitehouse-projects.html';
    
    function checkFrameset() {
    	
    	var isInFrameset = (top.location.href.indexOf(framesetString) != -1);
    	if (!isInFrameset) {
    		top.location.href = websiteURL + framesetString;
    	}
    	
    }
    And

    HTML Code:
    if(self.location==top.location) top.location.replace('../../starrwhitehouse-project.html');
    It seems like this one works more reliably. When a project sheet is opened by itself, it loads redirects it to the main page

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Yes, that will probably work pretty well. However, there are a few things to note:
    1. That isn't really "fixing" anything. It's just making it look like it is. Users will still find the content pages rather than the main page because google won't see the Javascript redirect-- it'll keep linking there, but the visitors will mostly be redirected to the main page.
    2. Anyone (including search engines) without Javascript enabled will remain on the pages.
    3. Using Javascript (not that there is a better way) is the only way to do this, but JS is unreliable in general-- another kind of redirect would be better, but you need JS to know what page they're on. No solution there.
    4. It might make the page less accessible to some users, like those with visual difficulties-- if they have a screen reader program, it might not be able to read from the contents of the included iframe page without going to it directly.

    Anyway, it's a rough and easy solution that should make your site work a little better.

    If you have time, I strongly recommend looking into using a serverside language. That's how to actually fix this as a long term solution.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •