If you have been doing SEO for the past few years, particularly for start-ups, chances are you have had to figure out how deal with SEO for Progressive Web Apps. Progressive Web Apps can be great for users but they are not always the most reliable for SEO. Google has not exactly been consistent in its recommendations for how to deal with AJAX crawling. We always recommend to clients the “Sleep At Night” strategy when it comes to SEO – meaning if you want to sleep at night, you’ll do the thing that guarantees the least amount of SEO ambiguity, which in the case of these types of apps equals Progressive Enhancement.
We recently had an interesting case with Paysa, one of our fine stable of start-up SEO clients. Andy Lin, one of Paysa’s software engineers, had been working with window.fetch, one of the newer JS functions for AJAX calls. The function works for both Webkit and Firefox browsers. Andy also had a polyfill library loaded to provide fetch in case that functionality was missing. It all looked great on the dev server.
Before pushing this functionality live across the site, I recommended we set up a test page accessible to Googlebot to see how Google responded to this cutting edge approach. What we found was that pages that invoke Fetch on page load were broken when seen in Google Search Console’s “Fetch and Render” tool. Once we replaced those Fetch calls with jQuery.ajax instead, they all started working.
From this, Andy figured out that Googlebot must have some sort of window.fetch implemented, but not the way it’s implemented in Webkit. Hence, the polyfill did not use the fallback and Paysa’s use of it was triggering a JS error.
Now, as our readers know, we don’t always trust Google Search Console so just because it shows an error doesn’t mean there is one, and Google has gotten a lot better at indexing JS content, but there is still a lot of ambiguity in how Google treats these types of apps, so we still stand by the Sleep At Night strategy. After all, a well-rested SEO client is usually a happy SEO client.