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

Improve mobile device detection on the server side #875

Open
arielsvn opened this issue Mar 12, 2020 · 0 comments
Open

Improve mobile device detection on the server side #875

arielsvn opened this issue Mar 12, 2020 · 0 comments
Labels

Comments

@arielsvn
Copy link
Contributor

We use the component ResponsiveSwitch to detect when a user is navigating on a small device and render the mobile version of the app. This component measures the width of the screen on componentDidMount.

On the serverside, NextJS never mounts the components so it assumes that the user is on a large device. However, we could make a better guess based on the user agent.

This should improve our page score on mobile and reduce the time to the first meaningful paint.

image

@arielsvn arielsvn added the seo label Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant