duande1986 2015-06-28 20:58
浏览 47
已采纳

为什么我的画廊页面需要很长时间才能加载?

When I go to this page of the site I'm building: http://test.kianistudios.com/placepigalle/gallery.php

it takes insanely long to load. In fact, as I scroll down the page (in Chrome), even the background doesn't load and there's just transparent backgrounds: http://oi61.tinypic.com/2zqttox.jpg and it freezes and lags for about 15 seconds before it fully loads. I have no idea why, other websites have hundreds of images much larger and they load with a breeze.

Here is my code http://pastebin.com/raw.php?i=y6EqeFTW

Many thanks!

  • 写回答

3条回答 默认 最新

  • drsdvwsvo78320812 2015-06-28 21:09
    关注

    Use your F12 dev tools / Firebug / Chrome network tab:

    1. Images are too large (not optimized for web) see this post (217 MB of downloaded material - as someone else mentioned this is probably your biggest hit in terms of time)
    2. You're making too many requests for js files - browsers are limited on the number of simultaneous requests and so it is having to wait to downoad your js files until the images are done.
    3. Your PHP script took 9.5 seconds to run at least one time after refreshing. Take a look at your code in PHP and see about how to optimize it.
    4. jQuery isn't loading - 404 at "js/vendor/jquery.js"
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用