Utils.getScriptPath implementation and async script loading #234

ximus opened this Issue Jan 10, 2012 · 1 comment


None yet
2 participants

ximus commented Jan 10, 2012


Utils.getScriptPath is written in a way which assumes that scripts are downloaded and executed sequentially by browsers. However this is not always the case anymore as more developers add defer and async attributes to their script tags.

The following bit in galleria.js line 192:

// the currently executing script is always the last
src = src || $('script:last').attr('src');

is not correct anymore, the currently loaded script is not necessarily the current. The pattern of downloading scripts asynchronously enhances the web experience and galleria should allow for it. It seems only the Flickr plugin invokes this function.

I'm not sure how to correct this though.

I have the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment