@springlab Yeah, I wouldn’t use that big of a gif loader right on top of the content. Perhaps a much smaller one somewhere next to the other buttons (previous, current, next) just above.
I’m not the person to ask about caching but what I would start with is adding an additional minified JS file. So in other words, if you have plugin.js, I would minify that but save it to plugin.min.js and call that version in the header (or footer).
I just found this article for caching ajax – http://davidwalsh.name/cache-ajax