图片负载大的博客-加速页面

发布于 2024-11-18 11:28:10 字数 156 浏览 4 评论 0原文

我正在建立一个旅游博客(Php),我可能会在其中加载数十张图片(大小 500x375 重量 150-200kb),以便页面重量超过 4-5Mb。 除了缓存/gzip之外,还有什么方法可以减少等待时间并提供更好的用户体验?

我使用共享服务器,因为我的预算非常低,

谢谢

i'm building a travel blog (Php) where I might be loading dozens of pictures (size 500x375 weight 150-200kb) so that the page weights more than 4-5Mb.
Which is the way to go apart from caching/gzip to decrease waiting time and make a better user experience?

I'm on a shared server as my budget is very low

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

笑,眼淚并存 2024-11-25 11:28:10

一些选项:

  • 将图像拆分到多个页面
  • 使用“延迟加载”脚本,该脚本仅在图像进入视口时请求图像
  • 使用 AJAX 通过用户操作根据需要请求图像
  • 利用图像的外部托管(flickr 等)在不同的服务器之间拆分服务器请求。

Some options:

  • split up the images across multiple pages
  • use a 'lazy load' script that will only request images as they come into the viewport
  • use AJAX to request images as needed via a user action
  • leverage external hosting of the images (flickr, etc) to split the server requests amongst different servers.
柠檬心 2024-11-25 11:28:10

如果您在一页上显示数十张图像,我会考虑只显示小图像/缩略图,当访问者单击它们时,它们会被放大。

If you're displaying dozens of images on one page, I would consider just showing small images / thumbnails that get enlarged when the visitor clicks on them.

我们只是彼此的过ke 2024-11-25 11:28:10

有一些点可以解决这个问题

1)显示一些图像,下面显示更多链接或图标

2)单击后进行 ajax 调用并显示其他图像

3)您还可以使用“jQuery 延迟加载插件”(这很容易集成..单击此处查看集成步骤)

There are some points that solve this issue

1) Show few images and below that show more link or icon

2) After clicking on that give ajax call and show other images

3) Also you use 'jQuery lazy loading plugin'(it's very easy to integrate..click here to see integration step)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文