 
	
		Tagged: enfold, optimization, Page Speed
- 
		AuthorPosts
- 
		
			
				
August 18, 2016 at 1:34 pm #674165I’m quite the noob, so please respond with as simple terms as possible… I have a website https://modernestudieteknikk.no that I am attempting to optimize in terms of speed. I have analyzed the site using http://www.gtmetrix.com and there seems to be a consistent low score in the “Defer parsing of Javascripts” tab. I have done the complete wordpress optimization recommendation in GT-Metrix, and have smushed images, added WP total cache, minifyed scripts and am running everything through cloudflare. My question is in regards to the JavaScripts that Enfold uses, and how i can optimize this? I am most interested in the Enfold scripts that seem to be running here: https://modernestudieteknikk.no/wp-includes/js/jquery/jquery.js?ver=1.12.4 (87.0KiB) 
 https://modernestudieteknikk.no/wp-content/themes/enfold/js/shortcodes.js?ver=3 (73.9KiB)
 https://modernestudieteknikk.no/wp-content/themes/enfold/js/avia.js?ver=3 (73.7KiB)
 https://modernestudieteknikk.no/wp-includes/js/mediaelement/mediaelement-and-player.min.js?ver=2.18.1-a (63.5KiB)
 https://modernestudieteknikk.no/wp-content/themes/enfold/js/aviapopup/jquery.magnific-popup.min.js?ver=2 (17.6KiB)
 https://modernestudieteknikk.no/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1 (7.7KiB)
 https://modernestudieteknikk.no/ (3.7KiB of inline JavaScript)
 https://m.modernestudieteknikk.no/hjemmeside-embed-optinbox (2.8KiB of inline JavaScript)
 https://modernestudieteknikk.no/wp-includes/js/wp-embed.min.js?ver=4.5.3 (1.2KiB)
 https://modernestudieteknikk.no/wp-content/themes/enfold/js/avia-compat.js?ver=2 (1.1KiB)
 https://modernestudieteknikk.no/wp-includes/js/mediaelement/wp-mediaelement.min.js?ver=4.5.3 (659B)How can I optimize my speed by “Defering the parsing of these javascripts”? Thanks August 21, 2016 at 7:30 pm #675398Hey! Try adding this at the very end of your theme / child theme functions.php file: add_filter('clean_url','async_js',11); function async_js($url) { if ( false !== strpos( $url, 'jquery.js' ) || false === strpos( $url, '.js' )) { return $url; } return "$url' defer='defer"; }Cheers! 
 Josue
- 
		AuthorPosts
- You must be logged in to reply to this topic.
