busyorg / busy

Blockchain-based social network where anyone can earn rewards 🚀
https://busy.org/
MIT License
359 stars 252 forks source link

Load first page of the feeds in server side #1147

Closed bonustrack closed 6 years ago

bonustrack commented 6 years ago

Now the feed are not visible by Google robots because it's loaded on user browser. Can we have them loaded on server side so Google can navigate in busy.org and index the posts?

Sekhmet commented 6 years ago

I started working on it, but couple of problems things came out that should be discussed.

  1. We are using infinite scrolling. That doesn't help SEO too much. Thing we could do is add meta links with next and prev (https://webmasters.googleblog.com/2014/02/infinite-scroll-search-friendly.html). We are paginating by start_author and start_permlink which is great for pagination, which would prevent duplicate content on multiple pages. Do you think it's alright?
  2. Another thing is that the feed we use on / depends on whether user is logged in or not. If they are, we use user feed, if not, it's trending page. How should we handle this server side? I don't think we should wait for login request to resolve to know if user is logged in or not. It takes 500ms+ to receive response from SteemConnect. Then we would fetch feed which would be another 500ms+. We can't assume user is logged in, because we don't have their username anyway. What do we do about it?
bonustrack commented 6 years ago

@Sekhmet

  1. Do you mean we would have /trending/busy?page=2 pages? I don't think pagination is necessary, the most important is that Google can see the posts of the first page and can see topics and sorting link. Paginated page are not much relevant for Google, what a page like this mean for user on Google?: busy.org/trending/busy?page=12
  2. In this case Google bot will not have any access_token stored in cookie so i don't see why we will need to wait a response from SC2.
Sekhmet commented 6 years ago
  1. This pagination is not for users, but only for Google. If GoogleBot visits /trending/busy/ it will only see 20 posts and nothing else, because bot can't scroll down. next and prev links in meta tags would allow GoogleBot to navigate website.
  2. So we should load /trending on SSR when / is requested?
bonustrack commented 6 years ago
  1. If it's not a big deal to do then yes. But kost important is to get Google able to see last 20 post for each trending topics with all sorting (trending, created, hot, promoted).
  2. Yes
Sekhmet commented 6 years ago

Alright, I don't think we would add meta links just yet. We don't have way to scroll up, so if user clicks on link from Google that would contain start_post they wouldn't be able to see higher posts, only go down. We will see if we need meta links after adding SSR for first page, and add them if needed.