0

There are some questions on SO on that already but most of them are quite old, I even found a mail archive from 2011 explaining that the issue was being worked on by myfaces.

So, is there a way to ajax update head tag ? Can I have an http responce like

<update head>

instead of

<update id="someid">
Ced
  • 15,847
  • 14
  • 87
  • 146
  • Tried giving the head an id? And what is the usecase? – Kukeltje May 10 '16 at 06:26
  • @Kukeltje use case is a single page app with dynamic include. When links are clicked it reach a listener that change the page that has to be rendered in the middle.Giving head an id is apparently not valid html. I'm trying turbolinks instead now because of that. It looks cool. – Ced May 10 '16 at 18:49
  • here if you wanna take a look : https://github.com/turbolinks/turbolinks – Ced May 10 '16 at 18:50
  • I have a (kind of) SPA to, with dynamic includes, but there is no need to update the head for me. Most of the js is in the head already and parts that are not, are in the body in the part that gets updated (even external js). So why the need to update the head? – Kukeltje May 10 '16 at 19:31
  • @Kukeltje Your way is nice. However the option to change meta tags, social media graph tags, title, and so on would be nice to have out of the box. – Ced May 10 '16 at 20:05
  • @Kukeltje Actually I think you are right. All these things I mentioned are mostly used when accessing the page directly -by google bots- and will be added when doing so. And the rest can be done with simple js. – Ced May 10 '16 at 20:18

0 Answers0