-
Notifications
You must be signed in to change notification settings - Fork 283
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
Middleware causes flicker each time the page is loaded #1168
Comments
Bildschirmaufnahme.2023-05-09.um.19.14.27.movI attached you a screen recording, I think one can see what I mean (at around 2 seconds) |
Any update on this? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
@borispoehland I reported the same issue in Discord, it's "working as intended" but I've asked for clarification as to why this is implemented this way. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Responded to the same thing here: #1593 (comment) We are actively looking into improving the white page flash, but as referenced above, this isn't a bug and is working as intended. |
I know this issue is closed but this middleware speed degradation on first load (in my case 200ms to 2 to 3 seconds) is a big, big issue and against the core ethos of Next.js. I'm definitely going to be losing traffic because of it. Please could this be prioritised and the community kept informed on progress? 🙏 |
@seanparkross this will be improved in our next major, coming in mid January |
I'm still experiencing this in Clerk Core 2. I don't think the middleware is the cause of this. The Screen.Recording.2024-05-09.at.2.12.42.PM.movEdit: Including attachment |
Unfortunately this is still "expected" behaviour. This original GH issue refers to a "white flash" that would happen on refresh before even the page was loaded. This was particularly obvious in slow connections. That issue was fixed with Core 2 |
@panteliselef I get it, but in the App Router demo, I can't seem to see this flickering. Or am I missing something? |
Hello,
I'm using the authMiddleware as in the docs for my Next.js project:
My
@clerk/nextjs
version is4.17.2
Every time I open my URL, the page loads (blank, white screen), then "reloads" into the final form. This process is super slow and unpleasant to watch. It feels clunky and I feel like this is not the supposed behaviour. Here is an example:
https://next-middleware-demo.vercel.app/
Appreciate you looking into this
The text was updated successfully, but these errors were encountered: