I have a small site, it has a bit of dynamic tabbed content which is loaded from a JSON file via an AJAX request and used to populate the DOM, the tabs themselves and content they contain are all generated on the fly from this JSON. This is all tied together with History.js so each tab is bookmarkable and indexable via a url: ?state=whatever.
I'm now looking to put together a sitemap.xml to submit to Google which contains all the URLs for the relevant tabs.
However, There is no server-side processing for the site, it is all static content served up in an S3 bucket.
I'm looking to see if there is a way, using purely font-end technologies to generate the sitemap from the same JSON file which is used to populate the various tabs.
Any ideas or suggestions?
Thanks,
Robert
For a bot to use your sitemap.xml, it has to be an actual file living on your server.
To create the file, you will need a server-side language to create it dynamically. This could be PHP, ColdFusion, .NET or whatever you like.
Here's what I would do:
Post your JSON object (holding your links in the site) to an AJAX request, to a server-side script that will take this data and then generate a file called sitemap.xml.
Does that help? Sorry if I am mis-understanding your question.
No, there isn't, the bot retrieving the sitemap will not run the javascript.