JS SEO office hours April 21, 2021

TL;DR
Discussion on JavaScript SEO, HTML rendering, and related issues.
Transcript
AUDIENCE: --this. MARTIN SPLITT: Hello and welcome to another JavaScript SEO Office Hours. Today, we have two questions from YouTube and then I'll open the floor for questions from the audience today. Thanks, everyone who joined today. For those who joined live, you can use the chat or the Raise Hand feature, or you can just unmute yourself and ask... Read More
Key Insights
- JavaScript SEO Office Hours are held bi-weekly to address various SEO-related questions, accommodating different time zones.
- Raw HTML versus rendered HTML discrepancies generally do not cause crawling issues but can delay link discovery.
- JavaScript is expensive and less predictable on the client side, so avoiding it when possible is advisable.
- JavaScript-generated content can interfere with search engines if it changes crucial information like meta tags or canonicals.
- Google Search handles JavaScript well, but using it for unnecessary tasks can impact performance.
- AdSense JavaScript code can affect mobile page speed, increasing bounce rates and potentially impacting SEO.
- Dynamic serving based on user agents is generally okay, but viewport detection is recommended for serving different HTML versions.
- Google's caching and rendering systems handle resources differently based on user agents and other factors.
Install to Summarize YouTube Videos and Get Transcripts
Explore YouTube Video Summarizer or Get YouTube Transcript Extractor
Questions & Answers
Q: What are the potential issues with raw HTML and rendered HTML discrepancies?
Discrepancies between raw and rendered HTML can delay link discovery, especially if links are added via JavaScript. For large sites, this might cause a delay in link discovery, but generally, there are no major crawling issues if JavaScript is implemented correctly.
Q: Can using JavaScript for meta tags and canonicals cause problems?
Yes, using JavaScript to change meta tags or canonicals can lead to mixed signals. For example, if the raw HTML has one canonical and the rendered HTML has another, it can confuse search engines, weakening the signal and causing indexing issues.
Q: How does AdSense JavaScript code affect SEO?
AdSense JavaScript code can negatively impact mobile page speed, increasing bounce rates and potentially affecting SEO. It's recommended to reach out to the AdSense team for guidance on minimizing performance issues associated with their scripts.
Q: Is dynamic serving based on user agents advisable?
Dynamic serving based on user agents is generally acceptable if the content is equivalent between mobile and desktop versions. However, using viewport detection is recommended to avoid issues, as user agent detection can lead to inconsistencies in content delivery.
Q: How does Google handle JavaScript-generated links in navigation?
Google can handle JavaScript-generated links, but they are discovered later in the indexing process. For important links, it's advisable to include them in the raw HTML to ensure timely discovery and indexing by Googlebot.
Q: Does Google prefer JavaScript on the client side?
No, Google does not prefer JavaScript on the client side due to its expense and unpredictability. While Google Search can handle JavaScript, it's recommended to use it only when necessary to avoid performance impacts.
Q: How does Google handle caching with different user agents?
Google's caching and rendering systems may handle resources differently based on user agents. While the exact implementation details are not specified, it's likely that caching is optimized for efficiency and accuracy in resource handling.
Q: What is the impact of empty canonical tags in HTML?
Empty canonical tags in HTML can lead to self-canonicalization, which might not align with the intended canonical URL. It's better to avoid empty canonical tags and ensure they are correctly filled either in raw HTML or through JavaScript.
Summary & Key Takeaways
-
The session addressed questions on JavaScript SEO, focusing on the differences between raw and rendered HTML. It emphasized the importance of having crucial links in raw HTML to ensure timely discovery by Googlebot.
-
JavaScript-generated content, including changes to meta tags and canonicals, can lead to mixed signals if not implemented correctly. However, Google Search generally handles JavaScript well.
-
AdSense JavaScript code can impact mobile page speed and SEO. Publishers are advised to consult the AdSense team for best practices to mitigate performance issues.
Read in Other Languages (beta)
Share This Summary 📚
Summarize YouTube Videos and Get Video Transcripts with 1-Click
Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator
Explore More Summaries from Google Search Central 📚






Summarize YouTube Videos and Get Video Transcripts with 1-Click
Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator