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

Falling back to pure SSR #575

Closed
babakness opened this issue Dec 30, 2016 · 5 comments
Closed

Falling back to pure SSR #575

babakness opened this issue Dec 30, 2016 · 5 comments

Comments

@babakness
Copy link

Hello, is it force SSR on all links based on a condition? For example, say a Bing searchbot visits (user agent contains " bing "), can we force all links to hit the server (SSR)? This could also be a nice fallback on text based browser as well.

@babakness
Copy link
Author

More broadly, it would be nice to have an api to say "hey Next, render the next route as SSR" (and forget all the components you've downloaded). Basically like forcing a browser refresh but only upon entering the next route.

@rauchg
Copy link
Member

rauchg commented Dec 30, 2016

That's how it works already. If you want only SSR and no client side, use <a href> instead of <Link>

@rauchg rauchg closed this as completed Dec 30, 2016
@babakness
Copy link
Author

Hmm.. maybe a mod to the Link component then. Basically you want CSR unless text only browser or a search bot. As far as I know Bing doesn't render Javascript.

@babakness
Copy link
Author

babakness commented Dec 30, 2016

Using <a> instead of <Link> mean ALL traffic will be SSR, which isn't the desired. Only in certain situations.

@arunoda
Copy link
Contributor

arunoda commented Dec 30, 2016

@babakness you could use when a BOT is using your site. You might have ways to identify a bot user from the client side.

Anyway, I don't think that's a good SEO practice.

If there's no JS, all <Link> tags will be <a> tags.
So, what you are asking is already there. :)

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants