0

I have performance issues with my gallery once i added social buttons.

The gallery currently has around 30 thumbnails, for each there are four social buttons for various service (fb,g+,twitter,pinterest).

But my pageload jumped up to thirty or more seconds rendering the page useless.

My question is : Can i somehow adjust the plugins so they load faster ? Should i maybe change my approach and display these "on demand" ? Or maybe should i divide the gallery into more pages so there is not so many of these at the same time ?

Slytherin
  • 474
  • 3
  • 17

1 Answers1

0

Since the images are hosted on the social networks servers you are making a request to their server each time to get the image. 4 images per thumbnail would be 120 requests which can add alot to the response time of your page.

I would suggest you host the images on your own server (maybe as a spritesheet) to reduce the amount of requests.

Cjmarkham
  • 9,484
  • 5
  • 48
  • 81
  • I did thought of this , but i thought once the image is downloaded for the first button, it is afterwards loaded from browsers cache. Is this not true ? – Slytherin Mar 05 '14 at 06:43
  • Although the images are from cache it still has to request the image from another server which happens each time for a button. Using your own server means only one request. – Cjmarkham Mar 05 '14 at 06:47
  • That is inconvenient. Accepting your answer. – Slytherin Mar 05 '14 at 06:52