JavaScript SEO Office Hours Notes: April 29th 2020

Ruth Everett
Ruth Everett

On 11th May 2020 • 2 min read

Notes from the Martin Splitt’s JavaScript SEO Office Hours on April 29th 2020

 
 

JavaScript Redirects Work as an Alternative to Server Side Redirects

It’s OK to use a JavaScript redirect instead of an HTTP 301/302 redirect without any downsides for Google, but it will only work for crawlers which understand JavaScript.

 

Google’s Testing Tools Can’t Use a Cache and May Show Errors Which Don’t Impact Googlebot’s Rendering

Google’s testing tools don’t use caching in order to represent the latest content on your server, but they are using Google’s infrastructure to fetch content which may time out, and show as an ‘Other’ error. The real Googlebot indexing infrastructure is a lot more patient.

 

Use Tree Shaking and Code Splitting to Reduce JavaScript Bundling Size

You can reduce the size of JavaScript code bundles with Tree Shaking to identify and remove code which is not being used. Unbundling the JavaScript will increase the number of network requests and may slow things down. Code splitting can be used to split the bundles to optimise caching.

 

Google Search Isn’t Using a Chrome 41 User Agent

Google search hasn’t been using a Chrome 41 user agent since 2019, although it’s possible this might be from another Google service. If you see this in server logs you should check the IPs using reverse DNS lookup to verify if it’s genuine Googlebot activity.

 

Change URL Parameter Names to Force Google to Reconsider a Parameter’s Value

Google may incorrectly learn that some parameters are irrelevant, resulting in pages with those parameters being seen as duplicates, and canonicalised. It may take a very long time for Google to reconsider the parameters, so you can change the parameter name to cause Google to reprocess the URLs.

 

Avoid Dynamic Rendering Unless Necessary

Dynamic rendering is a workaround and adds complexity, so should only be used if it’s absolutely necessary.

 

Be the First to Know About the Latest Insights From Google

Hangout notes

Loop me in!

Author

Ruth Everett
Ruth Everett

Ruth Everett is a Technical SEO Analyst at DeepCrawl. You'll most often find her helping clients improve their technical SEO, writing about all things SEO, and watching videos of dogs.

Get the knowledge and inspiration you need to build a profitable business - straight to your inbox.

Subscribe today