Next.js Discord

Discord Forum

Head request taking long time

Unanswered
Broad-snouted Caiman posted this in #help-forum
Open in Discord
Broad-snouted CaimanOP
Hi All, I have noticed the HEAD request of next page before landing from client side navigation takes longer time (avg > 1 seconds). We have checked APM(datadog) and found that HEAD request too calling the downstream services like BE APIs (that means serverside methods executed). My understanding was HEAD request shouldn't call server side methods and should call only during actual call (which is .json call). Can someone help to understand in next.js is HEAD request do call server side methods too? If yes, then shouldn't it supposed too else server side method will be called 2 times - one is during HEAD request, second is actual page call GET request? I have attached screenshot of our APM flamegraph highlighted HEAD request calling downstream services through nextjs server side methods. Our app flow is FE page with server side methods -> call python BE using graphQL.

0 Replies