PHP & AJAX SEO - For users with javascript and non javascript

Go To StackoverFlow.com

1

So I understand this may come across as a open question, but I need away to solve this issue.

I can either make the site do ajax request that load the body content, or I can have links that re-loads the whole page.

I need the site to be SEO compliant, and I would really like the header to not re-load when the content changes, the reason is that we have a media player that plays live audio.

Is there away that if Google BOT or someone without ajax enabled it does the site like normal href but if ajax or javascript allowed do it the ajax way.

2012-04-05 23:24
by RussellHarrower
Normally you do a bind to a LINK tag, which overrides the default and make it an ajax call. This way if JS is disabled, it uses the normal link - else it makes an ajax call. : - Marco Johannesen 2012-04-05 23:33


0

Build the website without JS first, ensure it works as wished, each link linking a new unique page. Google parses your site without JS, so what you see with JS off is what he sees.

Then add the JS, with click handlers to prevent the default page reload and do your ajax logic instead. You could use JQuery and .load() to do this quite easily.

Other solution, you could use the recommended Google method ( https://developers.google.com/webmasters/ajax-crawling/ ), but it's more work and less effective SEO-wise.

Or you can put your audio player in a iFrame...

2012-04-05 23:33
by mddw
Ads