4 ms·
Well, if you open that single page containing all the slides, and there are many slides, you would be putting a lot of load on your server. So then you would st
by amelius 11y ago
Well, if you open that single page containing all the slides, and there are many slides, you would be putting a lot of load on your server. So then you would still need some magic javascript to make it load in a delayed way.
- njharman 11y agoIf your server can't handle serving up 1-200 images at same time, your server sort of doesn't deserve to be on the internet. Any server today should be able to saturate it's network connection serving static content.
- amelius 11y agoIf there are 1000 simultaneous requests (from many users), 1-200 images become 1,000-200,000 images. I hope you see now why your argument is flawed.
- njharman 11y agoNope. My argument "Any server today should be able to saturate it's network connection serving static content." still stands. Which I wrote as clarification to stop someone from thinking / posting what you did. It doesn't matter how many requests for same images. Any server should be to fill network link serving static content. Even slow Apache could saturate 100Mbps 15! years ago. https://www.devside.net/articles/apache-performance-tuning https://www.devside.net/articles/apache-performance-tuning Those 200 images all fit into memory. All the server is doing is answering requests and copying those to the network interface. No disk IO, no computation, maybe not even the copy if server/nic can do zero-copy.
- amelius 11y agoI understand what you say. But consider the server as being the machine including the network interface. Then, still, the pipes are going to be congested sooner with multiple images instead of a single image per page.
- scintill76 11y agoMost browsers (I know Firefox, Chrome, and IE) automatically limit the number of concurrent requests they'll do on a single server. Adding JS to only prefetch, say, 10 slides forward, might be a good progressive enhancement, but not a requirement. And, along the lines of what someone else said, if your server is excessively burdened by a malicious client, or even one that doesn't execute your JS, that's a server problem.
- amelius 11y agoThose arguments are flawed for the following reason. Suppose your website has a single slide per page. Let's say the website allows N simultaneous users before it breaks down (becomes too slow). Of course, even a superfast server will break down at some point. Now, suppose browsers perform X concurrent requests (because of built-in behavior of the browser). Suddenly, you can not serve N users anymore, but only approximately N/X users.