Live data from Hacker News

Understand the JavaScript SEO basics

developers.google.com

41–50 of 61 posts

Re: Understand the JavaScript SEO basics

#41

Earlier quoted context omitted.

> Server side render fixed a lot of this and rankings/traffic jumped. Good, they should just delist client side rendered web pages.

While I love to rag on SPAs as much as the next person, doing that is ripe for antitrust. "They're trying to force the web to look like what they want"

“You didn’t go to huge extra expense to index my website so I am going to sue you for anti-trust” - good luck. Google has been picky about executing js all along.

Re: Understand the JavaScript SEO basics

#42
post #33

Earlier quoted context omitted.

Why? I enjoy writing client-side SPAs, and I can pump out a better UI/UX must faster than I could otherwise. My users don't care how I build it, just that the site works and is enjoyable to use. If I need server-side rendering I'll still write it with a client-side rendered (e.g. React), but tack on server-side rendering at the end.

>My users don't care how I build it, just that the site works and is enjoyable to use. Filter out poor users by making the site inoperable with older hardware. If they cannot afford current gen i9, they will not afford whatever my ad network is pushing. Increases the conversion rate, so all is good.

My laptop from 2011/2012 loads everything perfectly, albeit a bit slower. I assume most people have a computer produced in the last decade.

Even my grandparents use an old iPad or cheap smartphone.

My machine isn't particularly powerful either - I use an old Macbook.

Re: Understand the JavaScript SEO basics

#43
post #37
post #33

Earlier quoted context omitted.

Why? I enjoy writing client-side SPAs, and I can pump out a better UI/UX must faster than I could otherwise. My users don't care how I build it, just that the site works and is enjoyable to use. If I need server-side rendering I'll still write it with a client-side rendered (e.g. React), but tack on server-side rendering at the end.

I like to build my websites in COBOL but the browsers won't support it even though I'm more productive. You are not building this for yourself if you need to be indexed by google. You need to build in a supported way. The bigger question is why you think an spa should rank well in general. It's only one page.

Yes, I agree - server side rendering is likely better for SEO in most scenarios, and so I should consider it in a business context where SEO is essential.

This isn't everyone.

The comment I replied to said that Google should "delist client side rendered web pages", which is a terrible idea. Maybe I'm OK with the SEO hit? Maybe I've architectured my SPA so that it can be indexed? (At least to some degree)

> The bigger question is why you think an spa should rank well in general. It's only one page.

SPAs can have multiple pages (despite the name). Check out react-router [0]. Browser history can be manipulated to give the same "back button/forward button" functionality between logical pages. This is done for you by whatever framework you use.

For my use case, having the browser reload every time a page is changed would severely interrupt UX.

[0] https://reacttraining.com/react-router/web/guides/quick-star...

Re: Understand the JavaScript SEO basics

#44
post #8

A good search engine shouldn't process JS at all, and index only the content that is reachable via links pulled from HTML (which may, of course, be dynamic). The processing of JS explains a lot of the sheer garbage that is in the Google results. I think they do it because it ties into their business model. JS is needed to unearth the kind of crap that a certain segment of the user base is looking for. That certain se…

This is so out-of-touch with the modern web. Lots of totally legitimate websites, including major news outlets and Wikipedia, render their web pages on the client using JavaScript. Whether or not this is a good thing is a separate issue (personally I see nothing wrong with it), but it should be obvious that a useful search engine in 2019 needs to be able to index JavaScript-rendered content.

I just noticed I haven't been allowing any JS whatsoever from Wikipedia. Everything looks fine. I'm logged in and can edit, etc. (I fixed that now; all allowed).

But that's not my point; how did we go from "search engines shouldn't execute JS" to "you're out of touch if you think you can use the web without JS".

Re: Understand the JavaScript SEO basics

#45
post #43
post #37

Earlier quoted context omitted.

I like to build my websites in COBOL but the browsers won't support it even though I'm more productive. You are not building this for yourself if you need to be indexed by google. You need to build in a supported way. The bigger question is why you think an spa should rank well in general. It's only one page.

Yes, I agree - server side rendering is likely better for SEO in most scenarios, and so I should consider it in a business context where SEO is essential. This isn't everyone. The comment I replied to said that Google should "delist client side rendered web pages", which is a terrible idea. Maybe I'm OK with the SEO hit? Maybe I've architectured my SPA so that it can be indexed? (At least to some degree) > The bigger…

But to a crawler it's one "page". To humans it's different, but not to robot. Crawler still (mostly) "page" == GET

Re: Understand the JavaScript SEO basics

#47
post #42

Earlier quoted context omitted.

>My users don't care how I build it, just that the site works and is enjoyable to use. Filter out poor users by making the site inoperable with older hardware. If they cannot afford current gen i9, they will not afford whatever my ad network is pushing. Increases the conversion rate, so all is good.

My laptop from 2011/2012 loads everything perfectly, albeit a bit slower. I assume most people have a computer produced in the last decade. Even my grandparents use an old iPad or cheap smartphone. My machine isn't particularly powerful either - I use an old Macbook.

Even if it loads and performes OK, I still don't like it. Client-side rendering is making the web even more fragile - nothing is going to last anymore.

Re: Understand the JavaScript SEO basics

#48
post #45
post #43

Earlier quoted context omitted.

Yes, I agree - server side rendering is likely better for SEO in most scenarios, and so I should consider it in a business context where SEO is essential. This isn't everyone. The comment I replied to said that Google should "delist client side rendered web pages", which is a terrible idea. Maybe I'm OK with the SEO hit? Maybe I've architectured my SPA so that it can be indexed? (At least to some degree) > The bigger…

But to a crawler it's one "page". To humans it's different, but not to robot. Crawler still (mostly) "page" == GET

Yet here we are discussing TFA that says otherwise, and crawlers are only going to be become better at it.

This is a beautiful part of the new web: indexable applications.

Re: Understand the JavaScript SEO basics

#49
post #8

Earlier quoted context omitted.

This is so out-of-touch with the modern web. Lots of totally legitimate websites, including major news outlets and Wikipedia, render their web pages on the client using JavaScript. Whether or not this is a good thing is a separate issue (personally I see nothing wrong with it), but it should be obvious that a useful search engine in 2019 needs to be able to index JavaScript-rendered content.

I just noticed I haven't been allowing any JS whatsoever from Wikipedia. Everything looks fine. I'm logged in and can edit, etc. (I fixed that now; all allowed). But that's not my point; how did we go from "search engines shouldn't execute JS" to "you're out of touch if you think you can use the web without JS".

I guess the assumption was that search engines should be able to access the web, like humans do.

Re: Understand the JavaScript SEO basics

#50
post #46

I use middleware on my SPA’s static server that sends bots a lite SSR version of the page that gets SEO’d up pretty well. Best of both worlds

Showing the bot something different than the user could be seen as cloaking. We also do that in some cases. Just be really carefull with that strategy.
Post reply on HN