The Trouble with JavaScript and News Sites
The Trouble with JavaScript and News SitesJavaScript is unavoidable on the modern web, but best used sparingly. Google says it indexes JavaScript, but the realities are a lot more complex.To say my relationship with JavaScript is antagonistic would be an understatement. I have a long and colourful history of ranting about the dangers of JavaScript in the context of SEO, which I will not repeat here. If you’re interested and have some time to spare, these two talks I gave in 2018 and 2019 respectively will serve to set the context: Technical SEO in the Wild - Real World Issues and FixesJavaScript is Ruining the WebI’m far from alone in pointing out the issues with JavaScript and SEO. The folks are Onely are among the best when it comes to R&D in this area, and they’re generous with their knowledge. Here’s a great resource from them that highlights the most common issues JavaScript can cause for SEO: » 10 Most Common SEO JavaScript Issues and How to Fix Them In the context of news websites, JavaScript poses additional challenges. News moves fast and fresh articles are published at an astounding rate. Google is constantly crawling news sites to find newly published URLs and index them rapidly. When you have critical page content relying on client-side JavaScript, Google will need to render the page to index that content. This introduces a delay in Google’s indexing process, because rendering is far from rapid. In fact, research from those same folks at Onely showed that JavaScript pages are crawled (and subsequently indexed) nine times slower than pages that contain all their content and links in the raw HTML. Considering the speed with which news moves, I’m not sure a publisher can afford to be nine times slower than their competitors to get their stories crawled by Google. In fact, this is a quote from Google’s technical guidelines for news publishers:
The message is clear: don’t use JavaScript to load article content. But these recommendations are based on extreme scenarios where the page’s content is entirely loaded with client-side JavaScript. Fortunately for news publishers this is exceedingly rare. There are, however, plenty of other implementations of JavaScript that don’t directly interfere with Google’s ability to index article content, but still cause issues with the site’s SEO. Here are the most common JavaScript-related problems I see on publishing sites: Navigation MenuTop navigation menus often have a fold-out feature to show more links. Especially on mobile resolutions, fold-out hamburger menus are a common practice. In and of itself, this doesn’t have to be an issue - as long as the links contained in the menu are already present in the HTML source. Their presence in the HTML means Google can see the navigation links there and crawl them without issue. It also tells Google what your main news categories are, which will help your site’s topic authority for those categories. When fold-out menus use JavaScript to load links into the DOM, that’s when we start having problems. I see this with some regularity; the HTML only contains top-level navigation links, and the subcategory links are only loaded into the webpage when the menu is clicked. The root of the issue is that Google doesn’t click. When rendering webpages for indexing, Google doesn’t perform any actions. No clicking, no scrolling, nothing. So any content - links, text, or images - that relies on a user-action to be loaded into the webpage’s DOM are effectively invisible to Google. That includes navigation links. By hiding these navigation links from Google you’re presenting a much shallower site to the search engine, restricting Googlebot’s access to your (sub)sections. This results in less effective crawling, and weaker topic authority signals. Always make sure all your navigation links are present in the HTML and don’t require a client-side script action. PaginationA common way to implement pagination - i.e. showing more articles on a section page beyond just the first list of articles - is with Load More buttons or infinite scroll auto-loading. If you’ve paid attention so far, you’ll see the issue here. Google doesn’t scroll, and Google doesn’t click. If your site’s pagination uses JavaScript with either infinite scroll or a Load More button, chances are Google doesn’t see these additional articles on your section page. Effectively, you’re showing just a single list of articles to Google, with old stories dropping off rapidly as new articles take their place. The impact on SEO is that, as far as Google is concerned, you have a short list of articles associated with any section page. This negatively impacts on topic authority. Additionally, once articles drop off the first page of a section they lose internal link value in Google’s calculations, and their rankings will suffer accodingly (which is especially harsh for evergreen content). You’ll want your pagination to be easily crawlable and indexable for Googlebot. This means old-fashioned pagination links with unique crawlable and indexable URLs. I’ve written about optimal pagination for news publishers before. Comments & UGCIn a recent newsletter I spoke about the potential risks and benefits of allowing Google to index your reader comments and other user-generated content. Usually comment functionality is implemented with client-side JavaScript, which means Google will have trouble indexing it unless you make specific allowances. I won’t repeat my recommendations - if you’re interested, here’s the newsletter where I explore this issue in detail:
|
Older messages
Google's March 2024 Core Update
Wednesday, March 6, 2024
The latest Google core update could be a game-changer, and gives Google back control of the search quality narrative. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Turns out, Google is all about Links and Clicks
Tuesday, February 20, 2024
Internal Google documents revealed during their antitrust trial show how Google relies on user signals to evaluate content quality. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
The Impact of Article Comments on SEO
Tuesday, November 7, 2023
Allowing readers to post comments and contribute to your site is great for engagement and loyalty, but does come with some SEO repercussions.
Why Articles Should Be Optimised Before Publishing
Wednesday, October 4, 2023
One of Google's quirks means that once an article has been crawled and indexed, any changes won't necessarily be picked up by Google until it's too late.
Advanced Insights into Googlebot Crawling
Thursday, July 27, 2023
Here are some interesting aspects of Googlebot's crawling of news websites that are useful to know when you want to optimise crawl efficiency.
You Might Also Like
Help Me Decide What to Share
Friday, May 17, 2024
A poll!
Why it May Be Okay to Drop Beavers from Airplanes
Friday, May 17, 2024
But I wouldn't try it yourself.
How should you adopt LLMs? @ Irrational Exuberance
Friday, May 17, 2024
Hi folks, This is the weekly digest for my blog, Irrational Exuberance. Reach out with thoughts on Twitter at @lethain, or reply to this email. Posts from this week: - How should you adopt LLMs? How
Google penalises Site Reputation Abuse, starts rollout of AI Overviews
Friday, May 17, 2024
Immediately following the two-month grace period Google handed out manual penalties like candy at Halloween. Plus, Google I/O showed us the future of search. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Data is the only truth in business
Friday, May 17, 2024
Don't rely on outsourcing The world is pushing for stricter privacy policies: Safari has blocked all 3rd-party cookies from their browser. Google rolled out Tracking Protection to Chrome
6 Content Lessons From Gaining 7.8M Followers in 40 Months [Scale Your Impact #119]
Friday, May 17, 2024
And the new Course Creator Lab is finally live!
Focus on the Next Word
Friday, May 17, 2024
Turn what seems like an overwhelming burden into a manageable challenge. When you focus on the small changes, the blank page no longer looks daunting. Every great act is just the accumulation of small
For Authors • May Holiday Weekend Newsletter Promo + Social Media Posts
Friday, May 17, 2024
For Authors ~ Join Our Book Newsletter for Summer Reading Enable Images to See This Join ContentMo's MAY 2024 Summer Reading Promotion & Get Your Book Emailed ~ Tweeted & posted to Facebook
The Anti-Patterns Canvas—Turning the Book Into an Actionable Practice
Friday, May 17, 2024
Let Us Turn the Scrum Anti-Patterns Guide Book into Structured Practice
🧙♂️ Is chasing trends cringe?
Friday, May 17, 2024
Plus secret research on Car Keys Express, Bumble, and Rakuten