开发者

can javascript document.write head meta part for seo?

开发者 https://www.devze.com 2023-04-03 13:48 出处:网络
can javascript document.write head meta part for seo? I have dynamic pages, so I want write different head meta part by page loading.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号