I want to change some page elements with JS like title h1,h2,h3, p tags and so on.
So I want to place in my code something like
$(function() {
document.title = "This is the new page title."
});
So will it be SEO compatible? I have read some questions like this How to dynamically change a web page's title? and Can I randomly change the page title for users while showing search engines a static title? Some say that it will won't work, but some say that it will work because now google indexes js.
So will it be SEO compatible?
UPD: I want to change title for user and for google bots, for both of them.Just once on page load. There is always the same h1 for everybody, the changed title is the same for everybody.
Long story:
I need this because I am writing a js plugin. Something like cms but on our hosting. Client inputs there h1,h2,h3,h4 title and so on using recomendation of our seo improving program. He inserts at the end of page script, and script using some api get this values from our server and changes the page.
I know it is somekind of too much complicated. But if it works it will give more customers because customer is lazy and he doesn't won't to make changes in the website by himself sometimes websites don't have cms and he doesn't know html. So this script can be considered like external cms and in theory make customer's life simplier