I'm hoping someone with knowledge of Facebook can shed some light on something.
I'm having a bit of a challenge with regards to a link that I'm trying to incorporate on the links page of a website. The link is to a Facebook "group" page. The link works fine in email but not in one of the two links pages. This is the link: https://www.facebook.com/events/222475061167586/#!/groups/10340196291/
The customer values their privacy so I can't give you their URI. Just don't go there....
This particular customer has two copies of their site, a main one and a backup, which are on two separate hosting services. Both sites have the exact same files on them, including the links page with the Facebook link that is giving me trouble. We're not talking about two different links pages here, just a single page which is stored on two different hosting services. The hosting service used for the backup site does not embed webpages in a frame. The hosting service used for the main site DOES embed all webpages in a frame. I suspect this is a factor in the problem.
When I try the new link on the main site, it doesn't work. There are no error messages of any kind, I simply get an entirely blank page. When I try the new link on the backup site, it works fine. All of the other links on their pages work fine whether it is the backup site or the main site. But this is the only Facebook link anywhere on their website and it's the first Facebook link I've done so I'm may just be making an elementary mistake.
I think I've eliminated the obvious reasons something like this could happen. I copied and pasted the URI into the HTML of the links page so I know it is accurate. (I've also eyeballed it carefully to make sure it is the same.) I've validated both the HTML and the CSS and both check out with no errors or warnings. The HTML is written for XHTML1.0 Strict and I'm using CSS level 2.1.
I have tried both the Facebook help pages and googled on the issue of links to Facebook pages but have come across very little in the way of a clear example. They talk about getting a "page badge" but I have to believe that we are ultimately just talking about a standard URI, which I believe I already have abd can simply put into my link. I found one link that bears out that a regular URI is all you really need to build a standard HTML link.
I have two theories on what may be going wrong:
1. The fact that the main site embeds the HTML in a frame is messing things up somehow. I'm not sure the nature of that problem or what to do about it though.
2. The main site may be wanting me to sign in to Facebook and be having a problem in showing me the Facebook signin page. I'm not sure why that would be an issue though. I'm using Firefox 9.0.1 and there is an "exception" to allow facebook.com to show popups.
Can anyone tell me what I'm doing wrong or at least help me isolate the cause of the problem?
>This particular customer has two copies of their site, a main one and a >backup, which are on two separate hosting services. Both sites have the >exact same files on them, including the links page with the Facebook link >that is giving me trouble. We're not talking about two different links >pages here, just a single page which is stored on two different hosting >services. The hosting service used for the backup site does not embed >webpages in a frame. The hosting service used for the main site DOES >embed all webpages in a frame. I suspect this is a factor in the problem.
Facebook uses `X-frame-options: DENY` to prevent the site from being
loaded in a frame. In Opera you should see an error page saying "The
website does not permit its content to be displayed in a frame." but
it seems in Mozilla this is only noted in the Error Console.
-- Björn Höhrmann · mailto:bjo...@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
>* Rhino wrote in comp.infosystems.www.authoring.html: >>This particular customer has two copies of their site, a main one and a
>>backup, which are on two separate hosting services. Both sites have the
>>exact same files on them, including the links page with the Facebook link
>>that is giving me trouble. We're not talking about two different links
>>pages here, just a single page which is stored on two different hosting
>>services. The hosting service used for the backup site does not embed
>>webpages in a frame. The hosting service used for the main site DOES
>>embed all webpages in a frame. I suspect this is a factor in the problem.
> Facebook uses `X-frame-options: DENY` to prevent the site from being
> loaded in a frame. In Opera you should see an error page saying "The
> website does not permit its content to be displayed in a frame." but
> it seems in Mozilla this is only noted in the Error Console.
Is there anything that can be done so that my link works on the hosting site that embeds the frames? Or will I have to get the customer to change hosting sites just to avoid this problem?? That seems like a lot of work just to make one link work....
"Rhino" <no_offline_contact_ple...@example.com> wrote:
> "Bjoern Hoehrmann" <bjo...@hoehrmann.de> wrote in message > news:2m4hh7ts8cdl4qsl0r2jbg6pg6d3lie4pl@hive.bjoern.hoehrmann.de...
> >* Rhino wrote in comp.infosystems.www.authoring.html: > >>This particular customer has two copies of their site, a main one and a
> >>backup, which are on two separate hosting services. Both sites have the
> >>exact same files on them, including the links page with the Facebook link
> >>that is giving me trouble. We're not talking about two different links
> >>pages here, just a single page which is stored on two different hosting
> >>services. The hosting service used for the backup site does not embed
> >>webpages in a frame. The hosting service used for the main site DOES
> >>embed all webpages in a frame. I suspect this is a factor in the problem.
> > Facebook uses `X-frame-options: DENY` to prevent the site from being
> > loaded in a frame. In Opera you should see an error page saying "The
> > website does not permit its content to be displayed in a frame." but
> > it seems in Mozilla this is only noted in the Error Console.
> Is there anything that can be done so that my link works on the hosting site > that embeds the frames? Or will I have to get the customer to change hosting > sites just to avoid this problem?? That seems like a lot of work just to > make one link work....
Is there any particular reason why the link target _needs_ to be embedded
in the other site, rather than simply opening the link target in a new
window/tab (depending on the visitor's browser settings)?
My reason for asking is that it isn't just Facebook's use of
X-frame-options you have to worry about, but security settings and
the effects of various ad-blocking plugins that potential visitors
may be using.
> In article <jfasom$ri...@speranza.aioe.org>,
> "Rhino" <no_offline_contact_ple...@example.com> wrote:
>> "Bjoern Hoehrmann" <bjo...@hoehrmann.de> wrote in message
>> news:2m4hh7ts8cdl4qsl0r2jbg6pg6d3lie4pl@hive.bjoern.hoehrmann.de...
>> >* Rhino wrote in comp.infosystems.www.authoring.html: >> >>This particular customer has two copies of their site, a main one and a
>> >>backup, which are on two separate hosting services. Both sites have the
>> >>exact same files on them, including the links page with the Facebook >> >>link
>> >>that is giving me trouble. We're not talking about two different links
>> >>pages here, just a single page which is stored on two different hosting
>> >>services. The hosting service used for the backup site does not embed
>> >>webpages in a frame. The hosting service used for the main site DOES
>> >>embed all webpages in a frame. I suspect this is a factor in the >> >>problem.
>> > Facebook uses `X-frame-options: DENY` to prevent the site from being
>> > loaded in a frame. In Opera you should see an error page saying "The
>> > website does not permit its content to be displayed in a frame." but
>> > it seems in Mozilla this is only noted in the Error Console.
>> Is there anything that can be done so that my link works on the hosting >> site
>> that embeds the frames? Or will I have to get the customer to change >> hosting
>> sites just to avoid this problem?? That seems like a lot of work just to
>> make one link work....
> Is there any particular reason why the link target _needs_ to be embedded
> in the other site, rather than simply opening the link target in a new
> window/tab (depending on the visitor's browser settings)?
Sorry, I'm not following you. Are you suggesting that I use Javascript to force a new window to be opened? I'm not very keen on JavaScript since some people have it turned off. I'm not sure what to do for people like that. But if it's the only way, I might have to do it anyway....
> My reason for asking is that it isn't just Facebook's use of
> X-frame-options you have to worry about, but security settings and
> the effects of various ad-blocking plugins that potential visitors
> may be using.
I haven't encountered any of those things in my testing and haven't heard any visitor complaints about that either but I'm open to suggestions that will help me avoid any such problems.
> > Is there any particular reason why the link target _needs_ to be embedded
> > in the other site, rather than simply opening the link target in a new
> > window/tab (depending on the visitor's browser settings)?
> Sorry, I'm not following you. Are you suggesting that I use Javascript to > force a new window to be opened? I'm not very keen on JavaScript since some > people have it turned off. I'm not sure what to do for people like that. But > if it's the only way, I might have to do it anyway....
No, just provide the link as a link on the page; when a visitor clicks
on the link, they will get that link's target appearing in a new window
or tab, depending on their browser preferences. Much easier that trying
to figure how to circumvent Facebook's settings!
> > My reason for asking is that it isn't just Facebook's use of
> > X-frame-options you have to worry about, but security settings and
> > the effects of various ad-blocking plugins that potential visitors
> > may be using.
> I haven't encountered any of those things in my testing and haven't heard > any visitor complaints about that either but I'm open to suggestions that > will help me avoid any such problems.
Well, NoScript (for example) can block content from opening in an iframe
if it comes from a different domain to the parent page...
On Thu, 19 Jan 2012 21:45:09 +0000, Rhino wrote:
> The customer values their privacy so I can't give you their URI. Just
> don't go there....
> The hosting service used for the main site
> DOES embed all webpages in a frame.
Tell your customer to not be such a skinflint and pay for proper hosting.
No proper hosting company wraps your pages in their own frames.
>> > Is there any particular reason why the link target _needs_ to be >> > embedded
>> > in the other site, rather than simply opening the link target in a new
>> > window/tab (depending on the visitor's browser settings)?
>> Sorry, I'm not following you. Are you suggesting that I use Javascript to
>> force a new window to be opened? I'm not very keen on JavaScript since >> some
>> people have it turned off. I'm not sure what to do for people like that. >> But
>> if it's the only way, I might have to do it anyway....
> No, just provide the link as a link on the page; when a visitor clicks
> on the link, they will get that link's target appearing in a new window
> or tab, depending on their browser preferences. Much easier that trying
> to figure how to circumvent Facebook's settings!
I may be having a Stupid Day; I'm still not really clear on what you're proposing. Sorry!
>> > My reason for asking is that it isn't just Facebook's use of
>> > X-frame-options you have to worry about, but security settings and
>> > the effects of various ad-blocking plugins that potential visitors
>> > may be using.
>> I haven't encountered any of those things in my testing and haven't heard
>> any visitor complaints about that either but I'm open to suggestions that
>> will help me avoid any such problems.
> Well, NoScript (for example) can block content from opening in an iframe
> if it comes from a different domain to the parent page...
So what are you saying I should specifically do or not do in the development of my web pages for this customer?
On Thu, 19 Jan 2012 23:07:17 +0100, Bjoern Hoehrmann wrote:
> ...
> Facebook uses `X-frame-options: DENY` to prevent the site from being
> loaded in a frame. In Opera you should see an error page saying "The
> website does not permit its content to be displayed in a frame." but
> it seems in Mozilla this is only noted in the Error Console.
Actually, lots of sites use some sort of "Sorry, not in YOUR frame" script
to prevent getting included within a frame in someone else's page -- heck,
even tlvp.net does that, on just about every page :-) .
It's just 'bad taste' to include someone else's page within a frame in your
page :-) .
Cheers, -- tlvp
-- Avant de repondre, jeter la poubelle, SVP.
> On Thu, 19 Jan 2012 23:07:17 +0100, Bjoern Hoehrmann wrote:
>> ...
>> Facebook uses `X-frame-options: DENY` to prevent the site from being
>> loaded in a frame. In Opera you should see an error page saying "The
>> website does not permit its content to be displayed in a frame." but
>> it seems in Mozilla this is only noted in the Error Console.
> Actually, lots of sites use some sort of "Sorry, not in YOUR frame" script
> to prevent getting included within a frame in someone else's page -- heck,
> even tlvp.net does that, on just about every page :-) .
> It's just 'bad taste' to include someone else's page within a frame in > your
> page :-) .
You'll get no argument from me. ;-)
I don't like the frame being generated to go around my page but assuming it's out of my control - I could persuade the customer to change hosting providers but that's a lot of bother for one troubling link - what is the normal response to the situation?
Is there some way to make the link work despite the fact that the hosting service frames everything and Facebook hates frames? Or do I really have no choice but to change the hosting service to bypass this problem?
I have the feeling this is a well-understood problem with known solutions but I don't know those solutions so I'd appreciate some guidance. I know that Google is my friend but I don't know what search terms to use in this situation.
On Fri, 20 Jan 2012 19:21:16 -0500, Rhino wrote:
> "tlvp" <mPiOsUcB.EtLlL...@att.net> wrote in message > news:1jgm3b7uknfbx$.foljxblufnxz.dlg@40tude.net...
>> On Thu, 19 Jan 2012 23:07:17 +0100, Bjoern Hoehrmann wrote:
>>> ...
>>> Facebook uses `X-frame-options: DENY` to prevent the site from being
>>> loaded in a frame. In Opera you should see an error page saying "The
>>> website does not permit its content to be displayed in a frame." but
>>> it seems in Mozilla this is only noted in the Error Console.
>> Actually, lots of sites use some sort of "Sorry, not in YOUR frame" script
>> to prevent getting included within a frame in someone else's page -- heck,
>> even tlvp.net does that, on just about every page :-) .
>> It's just 'bad taste' to include someone else's page within a frame in >> your
>> page :-) .
> You'll get no argument from me. ;-)
> I don't like the frame being generated to go around my page but assuming > it's out of my control - I could persuade the customer to change hosting > providers but that's a lot of bother for one troubling link - what is the > normal response to the situation?
Have you already determined that your client's hosting company refuses to
serve your client's pages other than in framed fashion? And, even if so,
why is it that your client must *include*, *within* one of his (necessarily
framed) pages, a page that facebook serves?
Or have I just utterly missed the true nature of the problem?
> Is there some way to make the link work despite the fact that the hosting > service frames everything and Facebook hates frames? Or do I really have no > choice but to change the hosting service to bypass this problem?
> I have the feeling this is a well-understood problem with known solutions > but I don't know those solutions so I'd appreciate some guidance. I know > that Google is my friend but I don't know what search terms to use in this > situation.
> Anyone?
Cheers, and best of luck, -- tlvp
-- Avant de repondre, jeter la poubelle, SVP.
>>>> ...
>>>> Facebook uses `X-frame-options: DENY` to prevent the site from being
>>>> loaded in a frame. In Opera you should see an error page saying "The
>>>> website does not permit its content to be displayed in a frame." but
>>>> it seems in Mozilla this is only noted in the Error Console.
>>> Actually, lots of sites use some sort of "Sorry, not in YOUR frame" >>> script
>>> to prevent getting included within a frame in someone else's page --
>>> heck,
>>> even tlvp.net does that, on just about every page :-) .
>>> It's just 'bad taste' to include someone else's page within a frame in
>>> your
>>> page :-) .
>> You'll get no argument from me. ;-)
>> I don't like the frame being generated to go around my page but assuming
>> it's out of my control - I could persuade the customer to change hosting
>> providers but that's a lot of bother for one troubling link - what is the
>> normal response to the situation?
> Have you already determined that your client's hosting company refuses to
> serve your client's pages other than in framed fashion?
Good point. I have not contacted the hosting company to see if the framing of the pages they serve is optional. I just assumed it was not something they were willing to turn off. (There may be some good reason on their part for framing pages.) I suppose it is worth contacting them just to see if the framing can be turned off.
> And, even if so,
> why is it that your client must *include*, *within* one of his > (necessarily
> framed) pages, a page that facebook serves?
The client simply wants its visitors to be able to go to that Facebook page that this group gave them. This has never been a problem for any other link they chose to provide, although none of the earlier links has been to Facebook pages. But Facebook is very popular and they may well get other links for Facebook pages over time so we'd like to find some way that they CAN link to Facebook pages, ideally without changing hosting companies. Is there such a way? Or is changing hosting companies to one that doesn't frame its pages the only way to make that link work?
> Or have I just utterly missed the true nature of the problem?
I hope this further clarification finally explains what I'm trying to do.
>> Is there some way to make the link work despite the fact that the hosting
>> service frames everything and Facebook hates frames? Or do I really have >> no
>> choice but to change the hosting service to bypass this problem?
>> I have the feeling this is a well-understood problem with known solutions
>> but I don't know those solutions so I'd appreciate some guidance. I know
>> that Google is my friend but I don't know what search terms to use in >> this
>> situation.
>> Anyone?
> Cheers, and best of luck, -- tlvp
> -- > Avant de repondre, jeter la poubelle, SVP.
At 09:34:43 on Sat, 21 Jan 2012, Rhino <no_offline_contact_ple...@example.com> wrote in <jfeidg$to...@speranza.aioe.org>:
>The client simply wants its visitors to be able to go to that Facebook >page that this group gave them. This has never been a problem for any >other link they chose to provide, although none of the earlier links >has been to Facebook pages. But Facebook is very popular and they may >well get other links for Facebook pages over time so we'd like to find >some way that they CAN link to Facebook pages, ideally without changing >hosting companies. Is there such a way? Or is changing hosting >companies to one that doesn't frame its pages the only way to make that >link work?
Is there any reason why you can't just use target="_blank"?
I know that target tends to be heavily deprecated now, but since it would force the Facebook link to open in a new window of the browser, it seems to me it would bypass the frames problem entirely. And you could always add a wee note to explain that this particular link needed this heavy-handed approach? It seems to me to be somewhat less unfriendly than nagging them to refresh their browsers. But perhaps I'm missing something so obvious I simply can't see it!
Or (I'm very rusty on frames these days) would target="_top" break out of the frameset?
-- Molly Mockford
Nature loves variety. Unfortunately, society hates it. (Milton Diamond Ph.D.)
(My Reply-To address *is* valid, though may not remain so for ever.)
> At 09:34:43 on Sat, 21 Jan 2012, Rhino > <no_offline_contact_ple...@example.com> wrote in > <jfeidg$to...@speranza.aioe.org>:
>>The client simply wants its visitors to be able to go to that Facebook >>page that this group gave them. This has never been a problem for any >>other link they chose to provide, although none of the earlier links has >>been to Facebook pages. But Facebook is very popular and they may well get >>other links for Facebook pages over time so we'd like to find some way >>that they CAN link to Facebook pages, ideally without changing hosting >>companies. Is there such a way? Or is changing hosting companies to one >>that doesn't frame its pages the only way to make that link work?
> Is there any reason why you can't just use target="_blank"?
> I know that target tends to be heavily deprecated now, but since it would > force the Facebook link to open in a new window of the browser, it seems > to me it would bypass the frames problem entirely. And you could always > add a wee note to explain that this particular link needed this > heavy-handed approach? It seems to me to be somewhat less unfriendly than > nagging them to refresh their browsers. But perhaps I'm missing something > so obvious I simply can't see it!
> Or (I'm very rusty on frames these days) would target="_top" break out of > the frameset?
Thanks for your suggestion, Molly!
Both target="_top" and target="_blank" enable the Facebook link to work just fine. "_blank" puts it in a new browser instance while "_top" replaces the customer's page with the Facebook page, just like any other link.
The downside to using 'target' is that I get a validator error because I am using XHTML 1.0 Strict and 'target' isn't supported there.
I like to get my validations error-free but I'll take this one error on this one page over having to move to a different hosting service.
Maybe the hosting service can be persuaded to stop framing pages. If so, then I can take the 'target' attributes out, get my link to work AND have a clean validation.... A guy can dream can't he? ;-)
At 13:18:01 on Sat, 21 Jan 2012, Rhino <no_offline_contact_ple...@example.com> wrote in <jfevg5$tl...@speranza.aioe.org>:
>Thanks for your suggestion, Molly!
>Both target="_top" and target="_blank" enable the Facebook link to work >just fine. "_blank" puts it in a new browser instance while "_top" >replaces the customer's page with the Facebook page, just like any >other link.
>The downside to using 'target' is that I get a validator error because >I am using XHTML 1.0 Strict and 'target' isn't supported there.
Why are you using XHTML? Why not good old-fashioned HTML? What actual advantage does XHTML give to your pages? Occam's Razor tends to suggest that if you don't actually need the functionality of something, there's not much point in using it.
>I like to get my validations error-free but I'll take this one error on >this one page over having to move to a different hosting service.
>Maybe the hosting service can be persuaded to stop framing pages. If >so, then I can take the 'target' attributes out, get my link to work >AND have a clean validation.... A guy can dream can't he? ;-)
Indeed he can!
-- Molly Mockford
Nature loves variety. Unfortunately, society hates it. (Milton Diamond Ph.D.)
(My Reply-To address *is* valid, though may not remain so for ever.)
> The downside to using 'target' is that I get a validator error
> because I am using XHTML 1.0 Strict and 'target' isn't supported
> there.
Well, yes. "target" implies the use of frames, and "strict" does not
allow frames. But your host puts your pages inside of frames, so you're
kinda stuck. Unless you change hosts.
> Maybe the hosting service can be persuaded to stop framing pages.
I'm guessing they think they have a good reason to do that, so I doubt
they can be persuaded.
> If so, then I can take the 'target' attributes out, get my link to
> work AND have a clean validation.... A guy can dream can't he? ;-)
Or he can switch to a host that does not insist on placing everything
inside of their frames. This cannot be the only downside to that
arrangement.
2012-01-21 20:18, Rhino wrote:
> The downside to using 'target' is that I get a validator error because I
> am using XHTML 1.0 Strict and 'target' isn't supported there.
So why do you XHTML 1.0 Strict then?
> I like to get my validations error-free
Why? Do you get paid for that? Or have you set validation an end, rather than a tool?
> Maybe the hosting service can be persuaded to stop framing pages.
Maybe cows will fly.
If your hosting service frames your pages, the realistic options are: live with it, or move to a better service.
Molly Mockford wrote:
> * Rhino wrote in comp.infosystems.www.authoring.html: > > The client simply wants its visitors to be able to go to that Facebook > > page that this group gave them. This has never been a problem for any > > other link they chose to provide, although none of the earlier links > > has been to Facebook pages. But Facebook is very popular and they may > > well get other links for Facebook pages over time so we'd like to find > > some way that they CAN link to Facebook pages, ideally without changing > > hosting companies. Is there such a way? Or is changing hosting > > companies to one that doesn't frame its pages the only way to make that > > link work?
> Is there any reason why you can't just use target="_blank"?
> I know that target tends to be heavily deprecated now, but since it
> would force the Facebook link to open in a new window of the browser, […]
It would not. Depending on the browser's capabilities and the user's settings, it would display the document in a new window, a new tab, or in the same tab. Tabbed browsing being the norm rather than the exception now (even on mobiles), it is quite reckless to rely on target="_blank", to say the least.
The best thing you can do is to mark links to foreign sites (which is rather easy to do with CSS3) and omit the `target' attribute. The second best thing you can do is to mark such links and use a `target' attribute value that does not start with `_' (underscore) but is unique for your Web site or the purpose of the link (like target="my8472_fb"; use of session-based pseudo-random numbers is indicated then).
PointedEars
-- Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
> >> > Is there any particular reason why the link target _needs_ to be > >> > embedded
> >> > in the other site, rather than simply opening the link target in a new
> >> > window/tab (depending on the visitor's browser settings)?
> >> Sorry, I'm not following you. Are you suggesting that I use Javascript to
> >> force a new window to be opened? I'm not very keen on JavaScript since > >> some
> >> people have it turned off. I'm not sure what to do for people like that. > >> But
> >> if it's the only way, I might have to do it anyway....
> > No, just provide the link as a link on the page; when a visitor clicks
> > on the link, they will get that link's target appearing in a new window
> > or tab, depending on their browser preferences. Much easier that trying
> > to figure how to circumvent Facebook's settings!
> I may be having a Stupid Day; I'm still not really clear on what you're > proposing. Sorry!'
Well, at least one of us is, anyway! It seems I misunderstood: I thought
you were trying to embed the Facebook content within the page, rather
than simply having a link to follow. Looking else-thread, it seems that
even the simple link wasn't working to due the confluence of the hosting
service framing the site content and Facebook's anti-frames code...
Referencing else-thread also, if you're concerned about validating while
using the target fix for the problem, I don't think you'd lose anything
by using the html 4 frameset DTD instead of xhtml:
http://www.w3.org/TR/html401/sgml/framesetdtd.html