Check if loaded array

I’ll just say up front that i have no experience creating arrays. I’m wondering if it’s possible, (with an array) to ‘record’ where people have gone in my site. That way if they’ve already been somewhere, (specifically if a picture has been viewed previously) it’ll show up right away.

currently on my site when you click on the photos in the gallery after they’ve loaded the preloader still pops up for a fraction of a second when you go to view them again. i want to get rid of that.

if anyone has any bright ideas, that would be awesome.

many thanks,
_greg