Try for Free
Advertisement
  1. SEJ
  2.  » 
  3. News

Google’s John Mueller & Martin Splitt Answer JavaScript SEO Questions

Google’s John Mueller & Martin Splitt Answer JavaScript SEO Questions

Google’s John Mueller and Martin Splitt teamed up for another edition of the ‘Ask Google Webmasters’ video series to answer questions about JavaScript SEO.

Together, they took turns answering a series of rather technical questions with each of them adding their own unique insight.

Here’s a quick recap of each question and answer.

Question 1: What to Do With Old Assets?

“When using Rails Asset Pipeline for caching what status code do we give the old asset? Googlebot crawls these stale assets which we currently have 404’d. Do we 410 instead or keep the old assets alive for a couple months?”

In general, old assets should be kept around until they’re no longer being crawled. Eventually, Google will re-crawl the HTML content and get the new assets.

If you 404 old assets then you may end up with broken renders, which is something that should be avoided.

Question 2: Irrelevant Elements

“In prerendering can we replace or skip irrelevant elements? I.e. svg bar graphs generated by JS?”

Everything should be included in pre-rendering, or at least as many elements as possible, so Googlebot can see the full content.

Question 3: Rewritten Title Tags

“If your site has a chat function that rewrites the title tag for notifications to the visitor, how do you or the app supplier prevent Google from indexing the JS rewritten version of the title tag?”

In short, you cannot prevent Google from indexing a title tag that has been dynamically re-written by JavaScript.

In this particular instance, you can get around the issue by delaying the chat behind a user interaction. That would make it so the user has to click on the chat button before it opens up and changes the title tag. Since Googlebot doesn’t interact with anything it will never see the re-written title tags.

Question 4: JavaScript Inside Rendered Output

“In prerendering: can still be JS inside? JS that generates minor content layout changes, but not AJAX requests.”

Yes, when it comes to pre-rendering, JavaScript can still be used inside the rendered output. It makes sense to do this from a user experience perspective, so there’s no need to remove JS from pre-rendered pages.

ADVERTISEMENT
CONTINUE READING BELOW

Question 5: Will Pre-rendering or Dynamic Rendering Go Away?

“Will pre-rendering or dynamic rendering ever go away?”

Dynamic rendering may go away eventually, as it’s more of a workaround that will hopefully not be needed much longer.

Server side rendering and pre-rendering, on the other hand, are more useful in the long-term because they allow users (and crawlers) to receive content faster.

See the full video below:

CategoryNewsSEO
ADVERTISEMENT

Subscribe to SEJ

Get our daily newsletter from SEJ's Founder Loren Baker about the latest news in the industry!

Ebook

Matt Southern

Lead News Writer at Search Engine Journal

Matt Southern has been the lead news writer at Search Engine Journal since 2013. With a degree in communications, Matt ... [Read full bio]

ADVERTISEMENT
Advertisement
Read the Next Article
Read the Next
ok