dot_0620 2018-11-17 01:08 采纳率: 100%
浏览 65
已采纳

我可以在网页上显示多少张照片

I'm using a motion detect security camera, which will upload all its captured photos via FTP, to my hosting service. To view and manage the photos, I created a PHP file which will allow me to either display all the photos or delete them all. This is just being used to make sure my cats are OK when I'm traveling. So the PHP file will simply display each file name, timestamp, and the photo, with maximum screen width, since I'll be viewing on a little i-phone.

My question is, do i need to add code to limit the number of photos on the page it creates? Or can I depend on the browser to be smart enough to just load the part of the page its displaying, discarding what is not visible. I need to know this because if one of the cats decides to roll around the floor for an hour at a time, and I don't get to check if for a full day, it feasible I could have 500+ images.

I guess its not that big a deal to add a maximum image limit in my form that controls the PHP code, but if browsers can automatically handle ridiculous size pages, that's one less thing to deal with

EDIT: after some experimentation I was surprised to find that (a) all my PC based browsers (even a lowly I-8) and mobile devices (including my ancient I-phone-4) had little trouble displaying 1000 images, at about 1024 x 780. BUT... (b) browsing through them (especially on a mobile device) was ridiculously tedious, and had I not been on wiFI, I'd have paid for all that data download. So the bottom line non quantified answer to "how many" on modern devices seems to be "a lot more than you'd ever have time to view".

So in the end I added a bit more to my display form and code, so I could view a reasonable number of images at a time, choose how many photos per/page, sort (forward or reverse) by time stamp, and a few other niceties. Everyone's comments wewre indeed helpful

  • 写回答

1条回答 默认 最新

  • dongyan1808 2018-11-17 01:14
    关注

    The browser will load everything that's present in the html. So, you will have to limit the number of images uploaded yourself, maybe add a filter so it uploads only one image every 5 minutes.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了