FileServer from tutorial, 2000+ ms to connect?
Hello! I used this guide as an example, and made a small file server.
My problem is that when I load files from it, most of the requests takes 2000+ms to connect. The transfer itself is fast, just a few ms, but the initial connection has this big delay. I'm not sure what I have done that might cause this 😅
Deno
Write a file server
In-depth documentation, guides, and reference materials for building secure, high-performance JavaScript and TypeScript applications with Deno
3 Replies
Simplified it to this to remove all of my own logic, but it still has the same timing... 🥹
It seems when the page has been cached, it loads quickly, which is unsurprising. But whenever forcing a refresh it gets this timing back. I'll try a different browser too. Oh... the issue is only in Firefox... I shall investigate.
Are you on Windows? Try changing localhost to 127.0.0.1
Yes, windows! I'll do this when I get home, didn't have energy yesterday to debug much after bumping into this. Header values all looked OK so I was a bit out of ideas. 😅
I finally tried this, and with the local IP it works super 😄 I would probably never have figured this out, so big thanks 🤣