69998

Ajax Loaded meta Tags

Im quite new to the wonders of ajax. I've been playing around with stuff etc.

To elaborate, i have a simple 5 page website where every page is the same except for the content. Pretty generic scenario. So what i've done, is just added the content for each page using ajax. Meaning that in my website folder, i have ONE .php file. (kind of like a master page.) and all the content changes are just in smaller .html files that are loaded.

For Seo, Each page needs meta tags etc...

But if i have ONE page where just the content changes, obviously the meta tags for every page will be the same. Because the meta tags arent changing when the content is loaded.

So my question is... If I also have corresponding meta tag files and load them into the head at the same time as loading the content. The meta tags will then Change, Which is what im after.

BUT!!! because its all in one page and the meta tags will be loaded from separate file, will search engines still be able to... kind of work. Like, will google know that the website is one page but the meta tags are different?

I cant think of a better way to explain this. But any advice would be useful:) and if not... Will i have to revert my site back to the boring method of one file per page etc.

Cheers:)

x

Answer1:

As the meta tags are part of the dom you would be able to change the values. If you are trying to change them for SEO/Search engines I don't think it will make any difference as the spider (as far as I know) doesn't execute javascript.

You are best off making sure the site functions as you wish when javascript is disabled. Refered to as 'Unobtrusive JavaScript' or 'Graceful Degredation'.

Recommend

  • Jquery page transitions and SEO
  • Angular2 set meta title and description
  • How to do a specific condition for escaped_fragment with rewrite rule in .htaccess
  • NetBeans refactor class: java.lang.NoClassDefFoundError
  • Drawing a polygon over the entire map
  • Get or convert Week of year to ISO week
  • Is it possible to “shrink” a PdfPtable?
  • Copying rows in a database when rows have children
  • SSIS Designer is running VERY slowly
  • Efficient & Pythonic way of finding all possible sublists of a list in given range and the minim
  • Mixing WebForms and MVC: What should I do with the MasterPage?
  • How can I get the choice “H2” back in the H2 consol?
  • NHibernate manually control fetching
  • How to get links to open in the native browser in iOS Meteor apps?
  • Debugging VB6 Code From Visual Studio 2010
  • Content-Length header not returned from Pylons response
  • Yii2: Config params vs. const/define
  • Get one-time binding to work for ng-if
  • Xamarin Forms - UWP Fonts
  • Volley JsonObjectRequest send headers in GET Request
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • Importing jscolor library in angular 2
  • Why winpcap requires both .lib and .dll to run?
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • How do I rollback to a specific git commit
  • Arrays break string types in Julia
  • Is there a mandatory requirement to switch app.yaml?
  • How to get icons for entities from eclipse?
  • File upload with ng-file-upload throwing error
  • KeystoneJS: Relationships in Admin UI not updating
  • Proper way to use connect-multiparty with express.js?
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Free memory of cv::Mat loaded using FileStorage API
  • coudnt use logback because of log4j
  • Java static initializers and reflection
  • JaxB to read class hierarchy
  • Easiest way to encapsulate a HTML5 webpage into an android app?
  • Busy indicator not showing up in wpf window [duplicate]