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

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!

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"

It takes a long time because you are loading all images at full resolution instead of generating thumbnails.

Here's a link to a breakdown of how your site loads as evaluated by Pingdom tools: http://tools.pingdom.com/fpt/#!/dS6XMu/http://test.kianistudios.com/placepigalle/gallery.php

It appears that you are trying to force the user to download 122+ Megabytes of images in order for them to see your page. That's insane. Try generating thumbnails, using browser caching, and reducing the number of request connection timeouts.