You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the segment exceeds the maximum length, return a 404 or 414 page without incurring server-side rendering requests (in serverless environments).
Non-Goals
No response
Background
It could be very useful for social networks built with Next.js, especially in serverless environments where there is a price per request for server-side rendering.
Usernames typically have a maximum length of 32 characters, so there is no point in incurring a server-side rendering request if the segment is longer than 32 characters.
I'm aware that in Node.js this might not be possible, but it would be a nice feature for the edge runtime.
The only current alternative is to generate a server-side processing request and return an HTTP response status code of 404 or 414.
Proposal
I think a good implementation might be to specify operators in the segment name:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
It could be very useful for social networks built with Next.js, especially in serverless environments where there is a price per request for server-side rendering.
Usernames typically have a maximum length of 32 characters, so there is no point in incurring a server-side rendering request if the segment is longer than 32 characters.
I'm aware that in Node.js this might not be possible, but it would be a nice feature for the edge runtime.
The only current alternative is to generate a server-side processing request and return an HTTP response status code of 404 or 414.
Proposal
I think a good implementation might be to specify operators in the segment name:
Beta Was this translation helpful? Give feedback.
All reactions