Sunday, January 31, 2021

Using JS to insert tags

Like many websites, I have a bunch of commonly included <head> tags such as <meta>, <link rel="icon">...

I put them in a header.js file having $(document).ready(function(){ $("head").prepend('<meta name="description" content="Trump wife is a bitch">'); $("head").prepend('<meta charset="utf-8">'); $("head").prepend('<meta name="robots" content="index, follow">'); ...... }); <script src="header.js"></script> in <head>.

How does that affect how my website is crawled and indexed by Google? As far as I can see, my website doesn't appear in Google searches.

submitted by /u/deanstreetlab
[link] [comments]

from Search Engine Optimization: The Latest SEO News https://www.reddit.com/r/SEO/comments/l9u3yi/using_js_to_insert_meta_tags/>

No comments:

Post a Comment