Answer the question
In order to leave comments, you need to log in
Why is the server response with HTML content taking too long?
Look at the timings - https://www.screencast.com/t/OeeiYKsjX
This is how a lightweight Node application responds to requests.
The answer weighs 500 kb, and it makes no difference
whether the html is stored in the RAM or read from the disk with the express as a static file.
2. Whether it is compressed by gzip or given without compression.
3. Whether using express or not.
In general, even if txt of 500 kb is given without any express, then the answer will be 100 milliseconds (with some kind of waiting). But if you give a static PNG, for example, of the same size, then the answer is about 10 milliseconds.
What is the problem? Why do text files take longer anyway? And what is this waiting for the whole 100 milliseconds? As if some kind of delay was specially made.
Such timings in fox and chrome. There are no caching, I always press Ctrl+F5.
Answer the question
In order to leave comments, you need to log in
The question is closed.
I write under Windows, the antivirus checked the requests, respectively, the delay for the time of the check, and the sharp return of the whole file after the check.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question