My google PageSpeed result is telling me that I should remove render-blocking scripts, and lists https://cdn.localizejs.com/localize.js as one.

With the help of the https://www.drupal.org/project/async_js contrib module, we should be able to add support for async by doing something like this...

-    drupal_add_js('https://cdn.localizejs.com/localize.js', 'external');
+    drupal_add_js('https://cdn.localizejs.com/localize.js', array('external', 'async_js' => TRUE));
CommentFileSizeAuthor
#2 localizejs-async-2920965-2.patch632 bytesjenlampton

Comments

jenlampton created an issue. See original summary.

jenlampton’s picture

Status: Active » Needs review
StatusFileSize
new632 bytes

Patch for review.

  • eleonel committed dce6754 on 7.x-1.x authored by jenlampton
    Issue #2920965 by jenlampton: load localize.js asynchronously so it isn'...
eleonel’s picture

Thank you for your help, fix included in 7.x-1.5 version.

Cheers.

eleonel’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.