Next.js: on demand entries question

Created on 6 Mar 2017  路  19Comments  路  Source: vercel/next.js

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.

feature request

Most helpful comment

Why is this not done over sockets? 馃

All 19 comments

I'm thinking we can use new Image().src maybe instead of XHR just to avoid the horrible XHR logs?

@abstracthat what's your browser?
In chrome, we can't see this GET request in the console, but in the network tab.

@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.

Chrome 56. I don't believe I've configured anything special to show those requests. Typically I enjoy seeing what requests are being made.

image

I've found I can also hide these without too much trouble but for a new user I could see it being a bit annoying.

image

Why is this not done over sockets? 馃

@albinekb because of the custom server support, creating WS server inside the same port seems challenging.
But I like to introduce a new port and server for this.

Adding ^((?!on-demand-entries).)*$ to the network filter is my solution for the time being.

image

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.
Could someone explain to me please the purpose of on-demand-entries-ping ?
Thanks

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 <img> tag) would still end up in the Network tab.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

formula349 picture formula349  路  3Comments

lixiaoyan picture lixiaoyan  路  3Comments

irrigator picture irrigator  路  3Comments

olifante picture olifante  路  3Comments

havefive picture havefive  路  3Comments