 Thanks for watching this session on debugging JavaScript SEO issues. In the next 15 minutes, I will take you on a short journey in which we will talk a bit about the worries that a few SEOs still have about JavaScript and Google search. Then look at the tools available to SEOs and developers. And then get our hands dirty on a few case studies from the real world. Now let's get started with looking at the basics. When SEO and JavaScript be friends, there is a bunch of history behind this that contributed to various opinions and answers to this question. Today, the answer is generally yes. Sure, as with every technology, there are things that can go wrong, but there is nothing inherently or categorically wrong with JavaScript sites and Google search. Let's look at a few things people tend to get wrong about JavaScript and search. The number one concern brought up is that Googlebot does not support modern JavaScript or has otherwise very limited capabilities in terms of JavaScript features. At Google I.O. 2019, we announced the evergreen Googlebot. This means that Googlebot uses a current, stable Chrome to render websites and execute JavaScript and that Googlebot follows the release of new Chrome versions quite closely. The other worry is concerned with the two waves of indexing and the delay between crawling and rendering. Googlebot renders all pages and the two waves were a simplification of the process that isn't accurate anymore. The time pages spent in the queue between crawling and rendering is very, very short. Five seconds at the median, a few minutes for the 90th percentile. Remaining itself takes as long as it takes your website to load in a browser. Last but not least, be wary of blanket statements that paint JavaScript as a general SEO issue. While some search engines might still have limited capabilities for processing JavaScript, they ultimately want to understand modern websites and that includes JavaScript. If JavaScript is used responsibly, tested properly and implemented correctly, then there are no issues for Google Search in particular and solutions exist for SEO in general. For example, you may consider server-side rendering or use dynamic rendering as a workaround for other crawlers. When saying test your site properly, the follow-up question is usually, well, how do I test my site properly? And luckily, we have a whole toolkit for you to test your site for Google Search. Let's take a look at what's available. The first tool in your tool belt is Google Search Console. It's a super powerful tool for your Google Search performance. Besides a ton of reports, it contains the URL inspection tool that lets you check if a URL is in Google Search, if there are any issues, and how Googlebot sees the page. The second tool that is really helpful is the rich results test. It takes any URL or lets you copy and paste code to check. Its main purpose is to show a structured data is correctly implemented, but it has much more to offer than just that. Last but not least, the mobile-friendly test is similar to the rich results test. On top of the rendered HTML, the status of all embedded resources and network requests, it also shows an above-the-fall screenshot of the page, as well as possible mobile user experience issues. Now, let's take these tools for a spin. I have built three websites based on real cases that I debugged in the webmaster forums. The first case is a single-page application that does not show up in Google at all. As I'm not the owner of the domain, I don't have access to Google Search Console for this site, but I can still take a look. I will start with a mobile-friendly test to get a first look at the page in question. As we can see, the page loads but shows an error message. When I load the page in the browser, it displays the data correctly. We can take a look at the resources Googlebot tried to load for this page. Here we see that one wasn't loaded. The api.example.org slash products URL wasn't loaded because it's blocked by robots TXT. When Googlebot renders, it respects the robots TXT for each network request it needs to make, be HTML, CSS, JavaScript, images, or API calls. In this case, someone prevented Googlebot from making the API call by disallowing it in robots TXT. In this case, the web app handles a failed API request as a not-found error and shows a corresponding message to the user. We caught this as a soft 404, and as it is an error page, we didn't index it. Take note that there are safer ways to show a 404 page in a single page app, such as redirecting to a URL with a 404 status or setting the page to a new index. Right, we solved that one. That's pretty good. All right, on to the next one. This one is described as a progressive web app or PWA that didn't show up in search except for their home page. Let's go find out why. Looking at the home page, it looks all right. The other views in this progressive web app also load just fine. Let's test one of these pages. We will use the mobile-friendly test again to get a first look at what's going on. Oh, the test says it can't access the page, but it worked in the browser. So let's check with our DevTools. In the network tab, I see that I get 200 status from the service worker, though. What happens when I open the page in an incognito window? Whoops. So the server isn't actually properly set up to display the page. Instead, the service worker does all the work to handle the navigation. That isn't good. Googlebot has to behave like a first-time visitor. They load the page without the service worker cookies, and so on. This needs to be fixed on the server. Great. Two websites fixed, but I have one more to go. This one is a news website that is worried because not all content can be found via Google Search. To mix things up a little bit, I'll use the rich results test for this one. The website doesn't seem to have any obvious issues. Let's look at the rendered HTML. Hmm, even that looks fine to me. So let's take a look at the website in the browser. So it loads 10 news stories and links to each new story, and then loads more stories as I scroll down. Do we find that in the rendered HTML too? Interesting. This story isn't in the rendered HTML. It looks like the initial 10 stories are there, but none of the content that is being loaded on scroll. Wait, does it work when I resize the window? Oops, it only works when the user scrolls. Well, Googlebot doesn't scroll. That's why these stories aren't loaded. That's not exactly a problem. This can be solved by using an intersection observer, for instance. Generally, I recommend checking out the documentation at developers.google.com slash search for much more information on this topic and other topics. I hope this was interesting and helped you with testing your websites for Google Search. Keep building cool stuff on the web and take care.