{"id":1948,"date":"2018-07-31T10:31:19","date_gmt":"2018-07-31T17:31:19","guid":{"rendered":"https:\/\/wpjohnny.com\/?p=1948"},"modified":"2018-07-31T10:31:19","modified_gmt":"2018-07-31T17:31:19","slug":"optimizing-javascript-load-from-wordpress-plugins","status":"publish","type":"post","link":"https:\/\/wpjohnny.com\/optimizing-javascript-load-from-wordpress-plugins\/","title":{"rendered":"Optimizing Javascript Load from WordPress Plugins"},"content":{"rendered":"<p><strong>Having many javascript files loading will slow down your page load!<\/strong><\/p>\n<p>For that reason, I cover the 2 most common optimization tactics below:<\/p>\n<ol>\n<li>Defer them if they aren&#8217;t critical for initial page rendering.<\/li>\n<li>On pages where they aren&#8217;t used, disable them from loading at all.<\/li>\n<\/ol>\n<p><!--more--><\/p>\n<p><strong>How to defer javascript?<\/strong><\/p>\n<ul>\n<li>You can use one of those javascript merge or aync javascript plugins. They defer to the end of page load. Again, don&#8217;t defer any javascript that&#8217;s needed for initial page rendering (for example: JS related to sliders at the top of the page).<\/li>\n<\/ul>\n<p><strong>How to disable unnecessary javascript from loading?<\/strong><\/p>\n<ul>\n<li>Try those plugin organizers. Like &#8220;Plugin Load Filter&#8221; or &#8220;Plugin Organizer&#8221;.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Having many javascript files loading will slow down your page load! For that reason, I cover the 2 most common optimization tactics below: Defer them if they aren&#8217;t critical for initial page rendering. On pages where they aren&#8217;t used, disable them from loading at all.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","inline_featured_image":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[20],"tags":[],"hf_cat_post":[],"class_list":{"0":"post-1948","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-wordpress-plugins","7":"entry"},"acf":[],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Johnny","author_link":"https:\/\/wpjohnny.com\/author\/johnny\/"},"_links":{"self":[{"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/posts\/1948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/comments?post=1948"}],"version-history":[{"count":1,"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/posts\/1948\/revisions"}],"predecessor-version":[{"id":1949,"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/posts\/1948\/revisions\/1949"}],"wp:attachment":[{"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/media?parent=1948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/categories?post=1948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/tags?post=1948"},{"taxonomy":"hf_cat_post","embeddable":true,"href":"https:\/\/wpjohnny.com\/wp-json\/wp\/v2\/hf_cat_post?post=1948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}