Google Warns About Serving "Not Available" With JavaScript Before Content Loads
Briefly

Google Warns About Serving "Not Available" With JavaScript Before Content Loads
"A Reddit thread named "Google Might Think Your Website Is Down" is where this discussion came up. John Mueller replied to the concern saying, "Is that your site? I'd recommend not using JS to change text on your page from "not available" to "available" and instead to just load that whole chunk from JS." He explained "That way, if a client doesn't run your JS, it won't get misleading information.""
"John added, "This is similar to how Google doesn't recommend using JS to change a robots meta tag from "noindex" to "please consider my fine work of html markup for inclusion" (there is no "index" robots meta tag, so you can be creative). In short, by the time Google crawls the page, it only sees it is not available and then it goes away."
Loading placeholder text such as 'not available' into the page HTML before the actual content renders can lead crawlers to treat the page as missing. When bots do not execute JavaScript, they will see the placeholder and may skip indexing or ranking the page. The safe approach is to avoid client-side text flips from 'not available' to 'available' and instead either render the real content server-side or load the entire content chunk via JavaScript so only the actual content appears. Similarly, do not rely on JavaScript to change robots meta tags from noindex to allow inclusion.
Read at Search Engine Roundtable
Unable to calculate read time
[
|
]