Be Careful Relying on 3rd Parties to Render Website Content
Google’s Martin Splitt cautions site owners about the challenges that come with using JavaScript content rendered by third-parties, such as blog comment sections.
This subject came up during the August 3rd episode of Google’s Search Off The Record podcast, which also features John Mueller and Gary Illyes of the Search Relations team.
Problems With Third Party Content
Splitt addressed an issue that occurred last month where Google wasn’t indexing blog comments from Disqus.
Disqus is an example of third-party content which is embedded using JavaScript and rendered on the client’s side.
Although the content belongs to the site it appears on, it’s still “third-party” in the sense that it’s hosted on the Disqus server.
Any number of things can go wrong when a site owner relies on anything but their own server to render content.
However, as it relates to the issue with Disqus, it happened to be a glitch on Google’s side which caused the error.
Advertisement
Continue Reading Below
Splitt says the indexing issue prompted a bigger picture discussion about how to handle critical JavaScript content rendered by third parties.
At roughly the 13-minute mark in the podcast, Splitt discusses the various things that can go wrong when relying on content from another server:
“We found out what the glitch was, fixed it, and basically within the day we had it back working.
But I think this kind of started a larger discussion as to how you should do things when it comes to JavaScript and critical content from third parties.
Because the challenge is that you, as a website owner, don’t really have control over a third party.
And if you are using client side JavaScript to pull in content from the third party in the browser, things can go wrong.
They could robot their JavaScript API, and then we can’t make the request or maybe their servers are really under load. And then we decide not to make these requests to the third party because they are already experiencing high load situations.”
Advertisement
Continue Reading Below
Splitt goes on to explain how these problems can be avoided by doing everything on the server side.
If the third party has an API that can be interacted with on the client’s side, then it’s likely the same can be done server side.
Of course, that would require the expertise of a developer, but it is possible.
Splitt continues:
“And there are usually ways of doing this on the server side.
So if the third party exposes an API that you can interact with from the client’s side, from the browser with JavaScript, you can very likely also do that on the server side.
And then basically avoid these problems because then your server controls what happens when, in terms of when the data comes in from the third party.
But I think not as many people do that and I would hope that people are kind of warming up to the idea of doing that instead of doing everything in the client side.”
Bad Idea to Rely on Third Parties?
Google’s John Mueller adds to the discussion by asking: “Is it a bad idea to rely on third parties?”
It’s not a bad idea, Splitt says, it’s more like an “okay” idea to rely on third parties.
Although you do have to be careful, he explains:
“It’s an okay idea to rely on third parties. You just have to be careful and you have to understand that in the browser, you have very little control over what happens and how it happens.
And if you are relying on Googlebot to do the heavy lifting, and figure out how to get the data from the third party, then you are less in control than when your server does that work because your server is an environment that you have control over, hopefully.”
From there, the discussion evolved into questioning whether blog comments should be blocked from indexing and how to handle links in comments.
Advertisement
Continue Reading Below
Prior to addressing the Disqus issue there was a lengthy discussion from each team member about their first day of working for Google.
Interesting stuff if you ever wanted to know more about how the company recruits new hires.
Listen to the full episode here.
Comments are closed.