-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
on demand entries question #1364
Comments
I'm thinking we can use |
@abstracthat what's your browser? @rauchg Even we use an image, it's the same doing fetch. Network request will be there and when there's a 404 error, it'll log into the console. |
Why is this not done over sockets? 🤔 |
@albinekb because of the custom server support, creating WS server inside the same port seems challenging. |
Is there a way to prevent these calls from happening? |
@bhavin-prajapati no there isn't. If this relates to your other comment, this is disabled in production mode too 😄 |
Hi guys, I am using Next for my project and I went through this issue that I do not understand quite well. |
It is there to ping for updates when you change your code to make it faster from changed code to updated code running in your browser @donaminos |
Thank you very much @albinekb |
The Regex checkbox seems to be missing in newer versions of Chrome. You now need to add a leading and trailing slash to use Regex: I'll update the Wiki page. |
Not sure if this still an issue. Chrome now squashes multiple requests to the same url 🤔 |
Yeah, still an issue, at least in the network tab. I think Chrome only squashes console logs. |
Any other implementation (like @rauchg's suggestion for an |
Sockets would only show up as one connection (on page load) I think @timneutkens |
I suggest long polling or server sent events instead of websockets. Probably the first is less work to implement. |
Prioritizing this now. |
See #4495 |
Fixes #4495 Here's my approach for replacing the XHR on-demand-entries pinger #1364 #4495. I'm not sure if this is the way everyone wants to accomplish this since I saw mention of using a separate server and port for the dynamic entries websocket, but thought this would be a fairly clean solution since it doesn't need that. With this method the only change when using a custom server is you have to listen for the upgrade event and pass it to next.getRequestHandler(). Example: ``` const server = app.listen(port) const handleRequest = next.getRequestHandler() if(dev) { server.on('upgrade', handleRequest) } ```
Is there anyway to prevent my console from filling up with
Fetch complete: GET "http://localhost:3003/_next/on-demand-entries-ping?page=/".
while in development? With a new ping every 5 seconds my console gets quite noisy rather quickly.The text was updated successfully, but these errors were encountered: