iFrame question
- Started
- Last post
- 21 Responses
- hicklet
Heard a few things about them not being able to be seen by search engines, etc...
Any thoughts??
- sparker0
this still seems to be an ongoing argument online...
it is possible, depending on the search engine spider, to index iframe content...but, more than likely it will be indexed as a individual file instead of the content loaded in the frame.
so, if you have iframe A with page1.htm loaded in it...the search engine will index page1.htm as a single page...when a user clicks to visit your site...the will load page1.htm directly...
at least this is one view of the argument i've read about.
personally, i've never used an iframe...but, then again, i'm sort of a purist.
:)
- hicklet0
cheers sparker,
the reason for this was i've got lots of pages that have got a news section (similar to the one left) that has a fixed size and needs scroll bar, i've been trying to avoid frames - is library items an option, although never used this again.
thanks
- sparker0
i would simply ensure you have metadata in each content page that will be loaded into the iframe, then play around with regular expressions in the .htaccess file to see if you can force a redirect back to the main page...or similar action to make users always see the whole site, instead of a single content page from the frame...
might work.
- hicklet0
thank you i'll give it go...
- mg330
I don't think that's true.
I have iframes on my site and my band's site. All the content is seperate HTML pages loaded into the iframe.
I had a dilemma with the HTML pages coming up in searches, but displaying on their own and not with the framework of the site and iframe.
Didn't want to exclude those pages from SE's with robots.txt or .htaccess because I definantly need that content searchable.I asked around on here and got a great solution from someone on how to redirect my individual pages to the main site. (Can't remember who, will have to look my post up.)
Long story short, what you load into an iframe MOST DEFINATLY is searchable.
Try this search:
http://www.google.com/search?hl=…
You can see that the band page (which is an HTML that loads into the iframe) is found. Click it, it redirects.I'll grab the info I learned that from.
- mg330
Here ya go. It was NT member Bertrand that answered my question:
He copied the script here:
http://www.cafedumonde.net/temp/…Please also feel free to view the code in my iframes on http://www.theatlanticdivide.com… and also http://www.mg33.net
- sparker0
nice. thanks for the resource.
- cosmo0
iframes will be indexed but as an individual page, as sparker mentioned.
- mg330
cosmo,
the redirect I talked about - the final thing I have yet to figure out is how to get the link to load the desired page into the iframe.I know there's a way to do it, just have not had time to figure it out.
Major props to the first one who does!
- sparker0
there is where a pretty complex regexp could come in handy.
force it...
:)
- mg330
what's that?
- cosmo0
mg33, i'm confused about the redirect. Just woke up bro explain it a little clearly, please.
- sparker0
regular expressions. mod_rewrite, etc.
turning one thing into another...like urls for example.
- mg330
In each page destined for viewing in an iframe, you add this code in the HEAD.
script
/script
Of course add the < > tags to the script tags.
Where you see 'cframe' change it to the name of the destination iframe. Leave the rest of the script as is.
I don't know why it works. I'm sure there is some small tweak you could do to make the page open when it redirects.
Like I said, this solved my problem of needing content searchable, but the HTML page tha comes up in a search doesn't open as just an HTML page with text only. It redirects to the index.html of the site.
- cosmo0
aaahhh now i see. hmmm...if you can read the link for the proper page you could easily redirect it to the right page. are you using php/asp on your site?
- mg330
No. Just HTML. Interesting coincidence in the other iframe question thread someone just started.
- cosmo0
probably could write you a script to do that. Let me know.
- hicklet0
Just got back into work, thanks for all the help.. I will give it a go over the next few days.
:)
- cosmo0
mg33 did u get that redirect thing working?
- benfal990
bump