Google Says It’s Normal For Cached JavaScript Pages To Appear Empty


JavaScript-based webpages may appear blank or incomplete in Google’s cache, which is normal and not indicative of any problems.

This is stated by Google’s Search Advocate John Mueller in the latest installment of the Ask Googlebot video series on YouTube.

A question is submitted by an individual asking why their JavaScript pages aren’t showing in Google’s cached view.

The question reads:

“The cached version of React pages shows a blank page. What parameters should be considered while coding the React pages with SSR to make them Googlebot friendly?”

A cached page is a snapshot of what the URL looked like the last time it was crawled by Googlebot.

When a cached page looks like it’s empty, or is missing content, it’s natural to think Googlebot ran into a problem when crawling it. But that’s not always the case.

As Mueller explains, Google’s cache only captures the HTML elements on a page.

It’s not that Google isn’t capable of caching JavaScript, it’s more that Google is held back by browser restrictions.

Google’s Cache Displays HTML Only

Caching JavaScript-based webpages is challenging, Mueller says.

Not from a technical standpoint, but rather from security standpoint.

Web browsers have restrictions on how content can be accessed, and may block requests for JavaScript files when they come from other websites (like Google’s cache).

“Google Search sometimes keeps a copy of the HTML page that was fetched from a server and shows that to users in the form of a cached page. That is, however, really just the HTML page.

For JavaScript-based websites it gets a little bit complicated here. Because of browser security, there are restrictions on how content can be accessed from a page.

For example, if a page needs a JavaScript file from your server, browsers may block that request when it comes from other websites. In our case, the other website would be Google’s cache.

In practice, this means JavaScript-based websites often show an empty or an incomplete page when they’re shown from Google’s cache. This is normal and not a sign of a problem.”

While an empty page in Google’s cache may be discouraging, what really matters for search is how the page gets indexed.

To be sure, Google can process JavaScript separately and will try to index the page as users see it.

Mueller continues:

“In particular, for indexing, Google will process the JavaScript separately and try to index what a user would see when they visit your website directly. This rendered version of a page is visible in Google Search Console’s testing tools if you want to double check.

For the most part, Google can render and index content on JavaScript-based websites fine. So, in short, it’s normal that the cache view of a JavaScript website is empty or incomplete. That’s not an indication of a problem, it’s just a technical restriction in browsers.”

For a more accurate picture of how Google views your webpages, use the URL Inspection tool in Search Console.


Featured Image: YouTube.com/GoogleSearchCentral, April 2022.

!function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window,document,'script', 'https://connect.facebook.net/en_US/fbevents.js');

if( typeof sopp !== "undefined" && sopp === 'yes' ){ fbq('dataProcessingOptions', ['LDU'], 1, 1000); }else{ fbq('dataProcessingOptions', []); }

fbq('init', '1321385257908563');

fbq('track', 'PageView');

fbq('trackSingle', '1321385257908563', 'ViewContent', { content_name: 'google-says-its-normal-for-cached-javascript-pages-to-appear-empty', content_category: 'news seo ' });





Source link

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We Know You Better!
Subscribe To Our Newsletter
Be the first to get latest updates and
exclusive content straight to your email inbox.
Yes, I want to receive updates
No Thanks!
close-link

Subscribe to our newsletter

Sign-up to get the latest marketing tips straight to your inbox.
SUBSCRIBE!
Give it a try, you can unsubscribe anytime.