Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-side rendering (SSR) and SEO #89

Open
dmr opened this issue Mar 28, 2017 · 5 comments
Open

Server-side rendering (SSR) and SEO #89

dmr opened this issue Mar 28, 2017 · 5 comments

Comments

@dmr
Copy link

dmr commented Mar 28, 2017

Are there any plans to support server-side rendering with Foxhound?

I think this would greatly benefit the user experience on mobile and the general speed.
Thank you for building Foxhound, I like the idea of using the WP-API.

@iandunn
Copy link

iandunn commented Mar 28, 2017

Are you talking about having PHP render the markup for the initial page, rather than having to load the page, and then immediately make an API request to fetch the content?

Foxhound is already passing the content to JS during the initial page load. The markup is rendered by JS, but that's near instantaneous.

@ryelle
Copy link
Owner

ryelle commented Mar 29, 2017

My short answer is no, I don't plan to add server side rendering, the pre-loading that @iandunn mentioned was my compromise there — the theme doesn't have to wait for the API on the first page load, once the JS finishes loading, it should immediately render the content.

The approach I've seen for server side rendering in themes usually involves duplicating the components into PHP templates, but I didn't want to do that. I've seen automated approaches, where a node command generates PHP, for example, but it's still a cumbersome process. There are also approaches using a JS engine extension for PHP so that PHP understands JS — that's what 10up did with NodeifyWP — but again, I wanted something easy for a user to install, so requiring extra PHP extensions was out.

@dmr dmr changed the title Server-side rendering (SSR) Server-side rendering (SSR) and SEO Mar 29, 2017
@dmr
Copy link
Author

dmr commented Mar 29, 2017

Yes, I was asking for initially rendering the markup with PHP.

Thank you for the pointer to the SEO-issue. I think this might partly solve my issue/question.

If I search for the Foxhound demo blog article, google shows nice results, so in general the content preloading seems to work.

But if I search for the first sentence of the support page, I don't find anything:
https://www.google.de/search?q=I%E2%80%99ve+installed+Foxhound%2C+but+I+see+a+javascript+error+in+the+console+%E2%80%94+or+%E2%80%94+the+page+is+reloading+when+navigating+through+the+site&oq=I%E2%80%99ve+installed+Foxhound%2C+but+I+see+a+javascript+error+in+the+console+%E2%80%94+or+%E2%80%94+the+page+is+reloading+when+navigating+through+the+site&aqs=chrome..69i57.307j0j7&sourceid=chrome&ie=UTF-8#q=I%E2%80%99ve+installed+Foxhound,+but+I+see+a+javascript+error+in+the+console+site:themes.redradar.net&*

--> TL;DR
I think if there was a sitemap.xml google your index the page better and that would improve SEO?

@dmr
Copy link
Author

dmr commented Mar 29, 2017

The sitemap is just my guess, maybe it's something else but I want to find the content of every page on google.

@cr101
Copy link

cr101 commented Mar 29, 2017

The future of WordPress theme development is pretty unclear at the moment that is't very difficult to decide which approach to take.
@ryelle Which direction do you see WP theme development going into? Do you think that NodeifyWP's approach is future proof or is Foxhound the better option from a web developer's point of view?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants