I am developing a static HTML/CSS website I have multiple meta tags I add to the head on each page. As it stands currently whenever I want to change the meta information I need to manually update each page. I can easily write a script to insert the meta elements into the head, however I am not sure if this will have a negative effect on SEO performance. Will Google crawl pickup on the meta elements if they are loaded dynamically?
A basic example of what I am doing:
index.html
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" defer></script>
<script src="/assets/js/main.js" defer></script>
</head>
<body>
<h1>Example Page</h1>
</body>
</html>
head_elements.html
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<meta name=viewport content="width=device-width, initial-scale=1.0, user-scalable=0">
<meta name=robots content="index, follow">
<meta name=googlebot content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
<meta name=bingbot content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
<meta property=og:locale content=en_US>
<meta property=og:type content=website>
main.js
$(() => {
var $head = $("head")
$.get("head_elements.html", function (component) {
$head.prepend(component)
})
})
Does this process of dynamically adding the meta tags to the head have any drawbacks?