|Can't use X-UA-Compatible meta header when using Fanstatic||Thierry Florac||5/23/13 2:22 AM|
I need to define the "X-UA-Compatible" meta header for an intranet application using Fanstatic (actually 0.16).
Specifications says that this header must be placed "before any other header" in the HEAD tag; but even if I place it first, Fanstatic always inserts it's resources before it while rendering the page, making it ineffective.
Is there any way to handle this ?
|Re: [fanstatic] Can't use X-UA-Compatible meta header when using Fanstatic||Martijn Faassen||5/23/13 2:45 AM|
I ran into this recently to try to trigger Chrome Frame. In the end I
went with sending a response header instead instead of going for meta,
but before that I hacked up this strategy:
I used fanstatic.register_inclusion_renderer to register a bogus
extension (.xua, say) with a particular renderer and a very low order
(you can make it negative). The lower order makes this inclusion be
sorted high up.
The renderer doesn't actually do anything with its URL argument, but
instead just returns a snippet of HTML with the X-UA-Compatible meta
header in it.
You need to then register a resource for your app with that extension
.xua. It needs to have a file present that isn't actually used (as you
don't refer to using your snippet), but to please Fanstatic.
After this I got the meta header appear above everything else. It
still didn't trigger Chrome Frame properly but that was possibly due
to other issues. :)
We need to have a simpler way to support this kind of stuff in
Fanstatic though; perhaps a way to explicitly control that Fanstatic
should insert only under existing link tags or script tags. Proposals
and patches are welcome!
> You received this message because you are subscribed to the Google Groups
> "fanstatic" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fanstatic+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
|Re: [fanstatic] Can't use X-UA-Compatible meta header when using Fanstatic||janjaapdriessen||5/23/13 3:48 AM|
On Thu, May 23, 2013 at 11:45 AM, Martijn FaassenSee also:
Kit Blake said that fanstatic should render the inclusions just before
the closing element of the <head> section, instead of at the start.
Would anybody object to rendering the inclusions at the </head>?
|Re: [fanstatic] Can't use X-UA-Compatible meta header when using Fanstatic||Martijn Faassen||5/23/13 4:00 AM|
I'm trying to recall why I didn't do that in the first place. I can't
think of any good reason not to have the default behavior be at the
end of the </head>.
Besides changing the default, it would be good in general to have it
configurable somehow where inclusions get added.
|Re: [fanstatic] Can't use X-UA-Compatible meta header when using Fanstatic||janjaapdriessen||5/25/13 12:37 AM|
On Thu, May 23, 2013 at 1:00 PM, Martijn Faassen <faa...@startifact.com> wrote:I included this change in the 1.0a2 release of fanstatic.
Thierry, does this solve your issue?
Warning: This change may break your code, but it is probably a good
idea to include the resources at the end of the <head>.
I recall some earlier discussions on pluggable loaders and AMD/require.js.
Martijn, it would be cool if we could pair on this.
|Re: [fanstatic] Can't use X-UA-Compatible meta header when using Fanstatic||Thierry Florac||5/25/13 3:08 AM|
Le Sat, 25 May 2013 09:37:54 +0200,
Jan-Jaap Driessen <janjaap...@gmail.com> a écrit:
Can't test for it before next sunday.
I'll give you a feedback as soon as possible...