I've googled this & seem to have been led round the houses - sure this is a really common scenario.
I'm using a layout page (MVC) that contains a navigation bar & the head element containing the meta tags. This gets rendered when the home page is accessed via the address bar.
All other urls are accessed via an ajax call and a container div is loaded with the returned html - in other words the layout page isn't reloaded & my meta description is still the description for the home page.
I can't believe there's not a standard approach to this -I've been pulling my hair out trying various heath robinson solutions only to give up when I realise what an awful bodge they all are.
Anyone know a good way to deal with this scenario?
a load of meta tags etc in the head element. This is in a layout page (MVC) so on
Edit: This could be a face palm moment: I'm only concerned about the meta tags for SEO & so long as they are all there when the page url is accessed normally (i.e. not through ajax) I guess it doesn't really matter.
That said, there's other stuff in the head that I want to change like loading a different CSS file so the question still kind of stands....
I'm using a layout page (MVC) that contains a navigation bar & the head element containing the meta tags. This gets rendered when the home page is accessed via the address bar.
All other urls are accessed via an ajax call and a container div is loaded with the returned html - in other words the layout page isn't reloaded & my meta description is still the description for the home page.
I can't believe there's not a standard approach to this -I've been pulling my hair out trying various heath robinson solutions only to give up when I realise what an awful bodge they all are.
Anyone know a good way to deal with this scenario?
a load of meta tags etc in the head element. This is in a layout page (MVC) so on
Edit: This could be a face palm moment: I'm only concerned about the meta tags for SEO & so long as they are all there when the page url is accessed normally (i.e. not through ajax) I guess it doesn't really matter.
That said, there's other stuff in the head that I want to change like loading a different CSS file so the question still kind of stands....
Comment