{"id":18023145,"date":"2024-09-18T17:47:46","date_gmt":"2024-09-18T17:47:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/script-loading-waited-on-js-file\/"},"modified":"2024-09-18T17:48:42","modified_gmt":"2024-09-18T17:48:42","slug":"script-loading-waited-on-js-file","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/script-loading-waited-on-js-file\/","title":{"rendered":"Script loading waited on JS file"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I have been using WP Meteor on a site for several years with no issues. Today we ran into a problem that I believe was caused by the Javascript delay feature. Javascript execution was delayed while waiting on a call to the <a href=\"https:\/\/www.redditstatic.com\/ads\/pixel.js\">https:\/\/www.redditstatic.com\/ads\/pixel.js<\/a> asset. It eventually was terminated after 1.2 minutes with an ERR_CONNECTION_REFUSED.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Javascript worked as normal when using an ad blocker (which would have blocked this call altogether) and when WP Meteor was disabled. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">During the 1.2 minutes that the network request was open other scripts had the <code>javascript\/blocked<\/code> attribute. As soon as the network request terminated those scripts were able to run.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Is this expected functionality? The reddit pixel script tag is loaded through GTM and has an async attribute. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is no longer happening because the reddit pixel is loading quickly, but I&#8217;d like to identify the underlying problem to prevent this from happening in the future.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I started to debug the minified WP Meteor JS code but figured it would be easier to ask you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks.<\/p>\n","protected":false},"template":"","class_list":["post-18023145","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18023145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18023145\/revisions"}],"predecessor-version":[{"id":18023150,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18023145\/revisions\/18023150"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18023145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}