View Full Version : Defer parsing of JavaScript - Improve Homepage loading speed

October 20, 2013, 04:41 AM
I did a test using http://gtmetrix.com for the flynax demo website because my homepage load very slowly


317.0KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.

Are there any thing i can do to reduce the homepage loading speeding by JS parsing?

/libs/jquery/jquery.ui.js (90.4KiB )
/libs/jquery/jquery.js (82.9KiB )
/libs/ajax/xajax_js/xajax_core.js (31.6KiB )
/static.ak.facebook.com/connect/xd_arbiter.php?version=27 (21.3KiB of inline JavaScript)

October 20, 2013, 04:42 AM
/connect/xd_arbiter.php?version=27 (21.3KiB of inline JavaScript)
/templates/general_modern/js/lib.js (20.1KiB )
/libs/javascript/flynax.lib.js (15.8KiB )
/ (11.0KiB of inline JavaScript)
/plugins/currencyConverter/static/lib.js (6.0KiB )
/plugins/listings_carousel/static/carousel.js (5.9KiB )
/libs/jquery/jquery.textareaCounter.js (3.1KiB )
/plugins/multiField/static/jquery.geo_autocomplete.js (2.8KiB )
/libs/jquery/jquery.color.js (2.4KiB )
/plugins/reportBrokenListing/static/lib.js (1.4KiB )
/libs/jquery/cookie.js (562B )
/libs/jquery/datePicker/i18n/ui.datepicker-en.js (451B )

October 20, 2013, 04:45 AM
I already remove most of the plugins from loading but how about the following?

/libs/jquery/jquery.ui.js (90.4KiB )
/libs/jquery/jquery.js (82.9KiB )
/libs/ajax/xajax_js/xajax_core.js (31.6KiB )
/templates/general_modern/js/lib.js (20.8KiB )
/libs/javascript/flynax.lib.js (14.9KiB )
/libs/jquery/jquery.color.js (2.4KiB )
/ (1.6KiB of inline JavaScript )
/libs/jquery/cookie.js (562B )
/libs/jquery/datePicker/i18n/ui.datepicker-en.js (451B )

Are there anyone that i defer to load or put at the footer?

October 29, 2013, 12:20 AM
anyone has comment on this?

October 29, 2013, 04:55 AM
Hi rosegarden,

You can try to install our JS/CSS Files Compressor (http://www.flynax.com/plugins/compressionjscss.html) plugin.
That will solve part of your problem.

November 15, 2013, 03:54 AM
as i understand most of th server is serving compressed css and js which is accepted by most client device so how does this help?

November 26, 2013, 10:37 AM
In addition to compressing the plugin combines all css and javascript files into 2 files - one js file and one css file.

I think by "Defer parsing javascript" they mean a bit different thing, defer attribute for script tag will help you to improve it. It means that script will be loaded asynchronously from main thread.


<script defer type="text/javascript" src="{$smarty.const.RL_LIBS_URL}jquery/jquery.js"></script>
<script defer type="text/javascript" src="{$smarty.const.RL_LIBS_URL}jquery/jquery.color.js"></script>
<script defer type="text/javascript" src="{$smarty.const.RL_LIBS_URL}jquery/cookie.js"></script>
<script defer type="text/javascript" src="{$rlTplBase}js/lib.js"></script>
<script defer type="text/javascript" src="{$smarty.const.RL_LIBS_URL}javascript/flynax.lib.js"></script>
<script defer type="text/javascript" src="{$smarty.const.RL_LIBS_URL}jquery/jquery.ui.js"></script>
<script defer type="text/javascript" src="{$smarty.const.RL_LIBS_URL}jquery/datePicker/i18n/ui.datepicker-{$smarty.const.RL_LANG_CODE|lower}.js"></script>

but we advice to use above mentioned plugin