 |
|
09-06-2006, 01:55 AM
|
Complex Question
|
Posts: 178
Name: Sparsh
Location: India
|
Hey people
Please read this up carefully
I have an educational site and i am trying to make an encyclopedia type of interface wherin I will keep the interface constant and load every content page in an inframe .
Now the problem is that if someone uses a search engine to access any of my content pages then he shall only be able to see the content and not the common interface. Is there any solution to this problem ???
and could someone please tell me if there are browsers which dont support iframes ?? If yes which ones please specify.. Thanks in advance..
Cheers
Sparsh
|
|
|
|
09-06-2006, 06:35 AM
|
Re: Complex Question
|
Posts: 51
Name: simon
Location: London
|
You could add some javascript to your page that gets loaded into the iframe, something like
<SCRIPT LANGUAGE="JavaScript">
<!--
if (top == self) self.location.href =" Webmaster-Talk.com Webmaster Forum - Web Design, Coding, SEO Forums";
// -->
</SCRIPT>
This will force it to refresh to the new location. So people wont be able to view your iframe page on its own, it has to be within the structure of your site.
make sure you change the self.location.href link, to your site. The only problem with this is that you would have to add it to every iframe.
Please test this to see if it works properly.
|
|
|
|
09-06-2006, 06:36 AM
|
Re: Complex Question
|
Posts: 51
Name: simon
Location: London
|
oh its changed the link it should be h t t p : / / yourdomainname.com / your html page.html
hope that makes sence
|
|
|
|
09-06-2006, 06:37 AM
|
Re: Complex Question
|
Posts: 173
|
Quote:
Originally Posted by sparshpolly
if someone uses a search engine to access any of my content pages then he shall only be able to see the content and not the common interface. Is there any solution to this problem ???
|
Yes, you could use JS (in each of the content pages) to detect whether the current page is its own parent (i.e. not embedded via an iframe), and then do a redirect if neccessary.
I'll see what I can knock together.
Quote:
Originally Posted by sparshpolly
and could someone please tell me if there are browsers which dont support iframes ?? If yes which ones please specify..
|
Nutscrape 4 and earlier do not support them. But that is the least of their problems.
Rufo.
Last edited by Rufo : 09-06-2006 at 06:38 AM.
Reason: Beaten by 2 minutes! GJ, kinives-out
|
|
|
|
09-06-2006, 06:45 AM
|
Re: Complex Question
|
Posts: 51
Name: simon
Location: London
|
I`m not sure if the redirect on your iframe content may de-grade you google results over time i.e google may not like it, may be worth a google to see if it does effect seo.
One simple solution dont use iframes
|
|
|
|
09-06-2006, 07:53 AM
|
Re: Complex Question
|
Posts: 477
Name: Chip Johns
Location: Savannah Georgia
|
Quote:
|
I will keep the interface constant
|
Sparshpolly,
Just so that we have the entire picture of what you are accomplishing. Why is it necessary for the navigation NOT to refresh? There may be other solutions to this besides using the iFrame, but we need to know the reasons for your decision.
|
|
|
|
09-06-2006, 11:51 AM
|
Re: Complex Question
|
Posts: 178
Name: Sparsh
Location: India
|
As in check out the current page for example Alchemy :: Chemistry : Periodic Table
The thing on the left and top remains constant so I want to increase loading speeds by not loading those things again and again. Moreover if I have to add another page to my line then i need to update the links in all the previous pages.. that is too much of a hassle.
Could you please provide any alternate solution..
THanks a lot
sparsh
|
|
|
|
09-06-2006, 11:58 AM
|
Re: Complex Question
|
Posts: 178
Name: Sparsh
Location: India
|
@knives-out
if i load it in a page... (yourpage.html) then will it automatically open in the iframe in that page ??
|
|
|
|
09-06-2006, 12:02 PM
|
Re: Complex Question
|
Posts: 178
Name: Sparsh
Location: India
|
can someone please tell me something about pHP includes...please
|
|
|
|
09-06-2006, 12:09 PM
|
Re: Complex Question
|
Posts: 6,555
Location: Tennessee
|
Quote:
|
The thing on the left and top remains constant so I want to increase loading speeds by not loading those things again and again.
|
You misunderstand how the browser and HTTP function then.
It is not reloaded 'again and again'. Once the nav is loaded into the browser's cache the first time, it is NOT called from the server for any subsequent pages and does not increase bandwidth nor lower speed. When you go to subsequent pages that are using the SAME images/elements, they are called from the BROWSER CACHE on the user's machine, not the server. No speed loss, no extra bandwidth load.
The only time anything is called from the originating server again is if a user forces a re-load (shift-F5) from the server - and most people don't know to do that.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
Last edited by LadynRed : 09-06-2006 at 12:10 PM.
|
|
|
|
09-06-2006, 12:10 PM
|
Re: Complex Question
|
Posts: 178
Name: Sparsh
Location: India
|
but then how to solve the problem of the updation of links....
|
|
|
|
09-06-2006, 12:16 PM
|
Re: Complex Question
|
Posts: 6,555
Location: Tennessee
|
It's usually handled by the user's browser settings to update only that which has changed.
In IE, look at the following:
Tools, Internet Options - on the General tab, click on Settings (under temporary files section). The box says "Check for newer versions of stored pages" - The very first box, almost always checked by default, is - every visit to the page
Most people NEVER change this setting.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
|
|
|
|
09-06-2006, 12:19 PM
|
Re: Complex Question
|
Posts: 51
Name: simon
Location: London
|
I`m not sure your reason for why you use iframes is a very good one.
But all you need to do is copy that bit of javascript into every iframe page(not the main page, the page that loads into the iframe), just after the <head> in your html, then change the url parameter of the javascript to the page that holds the entire page
so if index.htm is the page with the iframe and all the main content, and the iframe is called iframe.html then the javascript needs to go on the iframe.html page and the url should point to your index.htm page
hmm
|
|
|
|
09-06-2006, 12:21 PM
|
Re: Complex Question
|
Posts: 178
Name: Sparsh
Location: India
|
you dint get me.. if i add new links to my site.., i dont want to manually update the links bar in everypage of my website.
|
|
|
|
09-06-2006, 12:22 PM
|
Re: Complex Question
|
Posts: 51
Name: simon
Location: London
|
I`m not sure your reason for why you use iframes is a very good one.
But all you need to do is copy that bit of javascript into every iframe page(not the main page, the page that loads into the iframe), just after the <head> in your html, then change the url parameter of the javascript to the page that holds the entire page
so if index.htm is the page with the iframe and all the main content, and the iframe is called iframe.html then the javascript needs to go on the iframe.html page and the url should point to your index.htm page
hmm quite confusing trying to explain myself
|
|
|
|
09-06-2006, 12:25 PM
|
Re: Complex Question
|
Posts: 178
Name: Sparsh
Location: India
|
is there any way that if i update the links they get updated on every single page of my website automatically
|
|
|
|
09-06-2006, 12:29 PM
|
Re: Complex Question
|
Posts: 6,555
Location: Tennessee
|
Quote:
|
you dint get me.. if i add new links to my site.., i dont want to manually update the links bar in everypage of my website.
|
Ahh, sorry, yes, I misunderstood.
The BEST way to do that would be to use a server-side include. I wouldn't use frames just for this.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
|
|
|
|
09-06-2006, 12:53 PM
|
Re: Complex Question
|
Posts: 178
Name: Sparsh
Location: India
|
whats that now... please elaborate.. am a bit new to advanced techniques
|
|
|
|
09-06-2006, 01:07 PM
|
Re: Complex Question
|
Posts: 6,555
Location: Tennessee
|
You essentially create the menu section as a separate file. Then in each page you would place the code that calls this separate file, the include, into the page. The server/browser 'assembles' the page behind the scenes. In order to maintain the menu, you would ONLY work on the separate include file, the server does the rest, populating your pages with the new menu.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
|
|
|
|
09-06-2006, 03:41 PM
|
Re: Complex Question
|
Posts: 51
Name: simon
Location: London
|
Do you use dreamweaver to create your designs? if so it has a less programatic solution, it has a thing called library items, if you make something a library item such as a bit of navigation code that gets used on say 20,30,40 or however many pages, to update all those pages you just change the one library item and it changes all the other pages for you.
So if you do have dreamweaver look up library items in the help guide. Otherwise like LadyRed said try google for "server side includes" or "how to do serverside includes"
|
|
|
| |