0

I've been struggling to get jquery and our master scripts file to defer and execute one after another (thanks, Google's Pagespeed)

I've used various methods, including require, LAB and the classic document.createElement method.

However - the JS files are being loaded async - and I believe that while JQuery is being downloaded, our master file is being downloaded - which throws errors in the console because JQuery hasn't completed yet.

Refresh the page and it's occasionally working - so I believe this is the problem.

Does anyone have any advice on deferring scripts, but loading and executing them not in parallel?

Jorge B
  • 53
  • 5

0 Answers0