N
Nuxt5mo ago
bnason

Fetch load time

Is there any way to get the time useFetch took to load the data?
3 Replies
dmarr
dmarr5mo ago
const startTime = Date.now()
await useFetch(...)
const totalTime = Date.now() - startTime
const startTime = Date.now()
await useFetch(...)
const totalTime = Date.now() - startTime
bnason
bnasonOP5mo ago
I'm actually constantly refreshing, so I've found that there are onRequest andd onResponse options I can pass to it where I'm basically ddoing thhe same thing Mostly I was wondering if there was some underlying fetch result that might include that already
dmarr
dmarr5mo ago
no

Did you find this page helpful?