duanli12176 2014-09-28 21:10
浏览 44

将图像字符串直接嵌入我的HTML有多糟糕?

Let's say I'm making some kind of PHP-based single-page image board that shows 100 small (<10kb) user-uploaded images. The oldest image is deleted from the server as soon as a new image is uploaded. Because the images come and go so rapidly I feel like there's not much of an advantage to caching them. It occurs to me that I could just embed the images as strings directly in the page's HTML, and that would also minimize the number of requests to my server. However, I feel like this must be a "bad thing". I'm wondering what input you knowledgeable folks have? Thank you!

  • 写回答

1条回答 默认 最新

  • douxia2053 2014-09-28 22:36
    关注

    It will be faster as much less connections are used. But you need to ask yourself if one particular user browsing through your site will see those images more than once, if yes than let the Web Server do the rest ( 304 response or similar )

    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效