Ad

HTML Title From Json - SEO Friendly Way?

- 1 answer

Changing the page title using jQuery, changes the title on the load of the page - but is there a SEO friendly way to do this?

My data is coming from json and I am handling it in jQuery.

document.title = 'test';
Ad

Answer

No, bots will only see the static title of the page as it is served by the webserver. Nothing you do in JavaScript will have any effect on that data. Furthermore, your approach is unfriendly to any browser with no JavaScript, making it wholly inaccessible.

You should control your title on the server; perhaps with a PHP script?!

Ad
source: stackoverflow.com
Ad