Image on Sate slow at changing require some assistance at preloading script.

Permalink
Hi i currently have a problem with image on states loading the alternative image slowly. I have heard of people pre loading but i can't find anything definative on the subject i have 6 images on the home page that require an image on state. I would appreciate any help provided.

 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
An easy way to pre-load images for non experts is to add an image block to the end of the page for each on-state image you want to pre-load, but putting the image in the regular state (with no on state for these blocks), then use block design to set display:none as a block specific style.

The page will then load all the on-state images straight away, but keep them hidden.

Be sure to put these in whatever area is last in the page as otherwise it will slow down rendering of more important stuff that can be seen.

Note that doing this could have a small adverse effect on SEO.

A better way to do it would be putting the on-state images in hidden image blocks in a stack and ajax loading the stack at the end of the page using my 'blocks by Ajax' addon. This will ensure the images are pre-loaded with no impact on the initial page load or SEO.
ibert replied on at Permalink Reply
Many thanks for your response, just out of curiosity how do you see the first method effecting SEO.
JohntheFish replied on at Permalink Reply
JohntheFish
It will affect the total load time of the page (time to last byte).