5 ms·
I would strongly suggest serving this landing page via http/2.0 - your 504 requests over http/1.1 are currently taking 3.5 minutes for me to load 2MB of data.
by Libbum 7y ago
I would strongly suggest serving this landing page via http/2.0 - your 504 requests over http/1.1 are currently taking 3.5 minutes for me to load 2MB of data.
https://ibb.co/5BWrqbx https://ibb.co/5BWrqbx
- BiteCode_dev 7y agoI would check why my code do 500 requests in the first place. That's unsane unless you do some kind of video game.
- lolc 7y ago500 requests are perfectly reasonable here. It loads mutliple pics per example avatar. And there are many examples. The only problem here is HTTP/1.1.
- BiteCode_dev 7y agoFrom what I see in my viewport, no it's not reasonable. Using 500 requests for this because http2 exists is like stating it's ok electron apps eat 1 Go of ram because we have big configs today. That's also why, in 2019, with quad cores, SSD and more memory than ever, things doesn't feel faster than 10 years ago.
- lolc 7y agoTurns out the other heads were removed so it's not doing 500 requests anymore. So where does that leave us? Should we keep arguing over the original situation?
- 4lejandrito 7y agoThis is all I am doing to serve images: https://gist.github.com/4lejandrito/6d4f903e0a692b87344e8600096a5af0 https://gist.github.com/4lejandrito/6d4f903e0a692b87344e8600... The resize function only resizes the first time and uses a cached version of the image after that. I checked the server and the CPU is not too high so I think it must be HTTP as parent pointed out.
- BiteCode_dev 7y agoYes, I checked and all I see is 22 requests. I don't know where OP got the 504 numbers. It also loads instantly for me. Ignore my comments, then.
- 4lejandrito 7y agoI misunderstood your original comment. The reason why there were 500 requests is because I was showing a background full of creepyfaces. It made the site look much nicer but it turns out it didn't scale very well.
- BiteCode_dev 7y ago:) Well, good thing you updated the site then.
- x86_64Ubuntu 7y agoHow does one ensure they are using HTTP/2.0 vs HTTP/1.1
- gnode 7y agoThere are various guides for enabling it in web servers that support it. It requires HTTPS as a prerequisite. For testing it in the browser: in Chrome at least, the developer tools Network tab details the protocol of each request/response. I believe Firefox has similar functionality.
- 4lejandrito 7y agoThanks for the suggestion! For now I am just disabling the background samples so that only 1 creepyface is loaded per user. Should be ready in a few minutes.