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

🚀 Feature: improve login page core web vitals #722

Open
2 tasks done
benmccann opened this issue Jan 13, 2024 · 1 comment · May be fixed by #740
Open
2 tasks done

🚀 Feature: improve login page core web vitals #722

benmccann opened this issue Jan 13, 2024 · 1 comment · May be fixed by #740

Comments

@benmccann
Copy link
Contributor

🔖 Feature description

Prerender the login page for improved core web vitals

🎤 Pitch

While investigating SvelteKit applications in the wild, I found that AppWrite consoles are written in SvelteKit and fail core web vitals. E.g. here's one such URL: https://auth.lucas-cm.com.br/login

A big contributor to this is that SSR is disabled, so just a blank page loads initially.

This could best be avoided by prerendering the login page.

(Alternately, the largest image on the page could be preloaded and you could render some image, background image, or text while the JavaScript is being fetched rather than leaving the page blank, but this would be more work, a worse user experience, and probably still worse on core web vitals)

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@benmccann
Copy link
Contributor Author

benmccann commented Jan 21, 2024

If we prerender we'll need to replace the usage of $page.search with something like new URL(location).searchParams

It appears to me that this is deployed using Docker, so the best solution is probably to switch to adapter-node and remove ssr = false. Running adapter-node would probably be much more lightweight than running something like Apache or nginx inside the Docker container.

@TorstenDittmann I see ssr = false was added in c806512, but I'm not sure why. Do you see any issues with removing ssr = false and switching to adapter-node?

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