Skip to content Skip to sidebar Skip to footer

How Use Javascript In Meta Keyword

i have this cod in Html: test page

&

Solution 1:

You may set and change metadata after the DOM finishes loading, but unless you intend to read in the values using JavaScript, there is likely to be little benefit in doing so as the browser has already used any applicable metadata when the document initially loads, and Google is likely to pay no notice to any metadata set by Javascript.

Strongly consider using a server side solution, such as PHP.


Solution 2:

$("meta[name='keywords']").attr("content", "sampel1,sampel2,sampel3");

Demo

As it was said before, there is pretty much no point of doing this. A server-side solution would have to be used.


Post a Comment for "How Use Javascript In Meta Keyword"