can javascript document.write head meta part for seo?
can javascript document.write
head meta part for seo?
I have dynamic pages, so I want write different head meta part by page loading.
First, I tried jquery, but jquery can not type the words in source code. So how about document.write
?
jquery code: but not print in source code.
$('#metad').attr('content','Top productions '+ seoword + '');
$('#metak').attr('content','Top productions, '+ seoword + '');
<meta name="description" id="metad" conte开发者_Python百科nt="Top productions" />
<meta name="keywords" id="metak" content="Top productions" />
You cannot use JavaScript to modify page content for SEO. Most of the times (all of the time?) bots will not run the JavaScript code, and as such will see your page before any JavaScript changes occured.
精彩评论