Welcome to WebmasterWorld Guest from 23.20.241.155

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Can PERL be used to load html page into a framset?

     
1:30 pm on Mar 9, 2006 (gmt 0)

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Search engines serve my content pages directly, outside of the site's frameset (yes, many will suggest getting rid of that!). Is there a method where I can insert a one line call to a cgi in each page that will cause the orphaned page to be loaded into the site's frameset? I am really interested in keeping the menus and headers static (no scrolling).

Thanks!

6:43 pm on Mar 9, 2006 (gmt 0)

5+ Year Member



I dont know about CGI but you can easily do this using JavaScript.

if (parent.frames.length == 0)
{
window.location.replace("/index.htm")
}

9:45 pm on Mar 9, 2006 (gmt 0)

5+ Year Member



you probably could if you are using perl to write the frameset document to begin with. If not, I am not sure how to do it. Maybe the javascript suggestion could work.
7:17 pm on Mar 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can't really do this effectively server-side because you can't rely on the referrer being sent by the user's browser. JavaScript is really the best solution. Look for a script that reloads the requested frame/page into the <frameset> page and not just simply load the <frameset> with the default pages (which frustrates users because they don't see the content they expected and usually just leave). Further, if you impliment any JavaScript solution, its a good idea to include a message in a <noscript> section to guide those users to the best way to view your site.
2:56 pm on Mar 11, 2006 (gmt 0)

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Thanks guys! I'll try the javascript out. Haven't used javascript for much of anything on the site. Meanwhile I've updated my copyright notice, which is SSI on 95% of my pages with a clickable logo to "ENTER" the site, which will put the user where I want them to be. I'll run a dozen or so high traffic pages with the javascript and compare against a similar number of pages without the javascript and see if there's a difference.
6:23 pm on Mar 11, 2006 (gmt 0)

5+ Year Member



rainborick, I agree. Therefore, this is the required code for that.

if (parent.frames.length == 0)
{
window.location.replace("/index.htm?framepage=document.location.href")
}

You can then check for the “framepage” value in index.htm and load the requested content page in frameset.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month