michelleyla

Java script to the bottom of the page

1 post in this topic

Good afternoon,

I am using the BT travel template for a while but i found out that my website became very slow.

Thats why i decided to build a new server with a new joomla installtion to do everything good in ones.

I installed joomla 3 with the plugins JCH optimize and Scriptdown. For the rest everything is from the quickinstall of the BT travel template.

At the server i installed mod_pagespeed.

When i run pagespeed of yslow then i see that my .js files are not loading at the end. I would to run the js files at the bottom of the page for speeding up my website. Normally the plugin scriptdown should do this but its not working. I guess the issue is that they page is working with T3.

Next to that i see that a lot of js files and some css dont have a cachevalidator. see below:

  • /media/jui/js/jquery.min.js (83.7 KiB)
  • /media/system/js/mootools-core.js (74.8 KiB)
  • /templates/bt_travel/html/mod_bt_tabs/themes/default/js/default.js (61.6 KiB)
  • /plugins/system/t3/base/bootstrap/js/bootstrap.js (30.3 KiB)
  • /media/system/js/calendar.js (27.8 KiB)
  • http://www.myurl.nl/modules/mod_btimagegallery/tmpl//js/jquery.fanm.nl/ (26.3 KiB inline Javascript-code)
  • /modules/mod_btquickcontact/assets/js/validate.jquery.js (24.2 KiB)
  • /templates/bt_travel/html/mod_bt_backgroundslideshow/js/default.js (21.1 KiB)
  • /modules/mod_bt_contentshowcase/assets/js/jcarousel.js (14.9 KiB)
  • //modules/mod_btquickcontact/assets/js/form.jquery.js (14.6 KiB)
  • /templates/bt_travel/html/mod_btimagegallery/js/default.js (12.4 KiB)
  • /modules/mod_bt_contentshowcase/assets/js/hammer.js (10.7 KiB)
  • /modules/mod_btimagegallery/assets/js/hammer.js (10.7 KiB)
  • /modules/mod_bt_tabs/tmpl/themes/accordion/js/hammer0.6.4.js (10.6 KiB)
  • modules/mod_bt_tabs/tmpl/themes/default/js/hammer0.6.4.js (10.6 KiB)
  • plugins/system/azrul.system/pc_includes/ajax_1.5.pack.js (10.3 KiB)
  • templates/bt_travel/html/mod_bt_login/js/default.js (7.6 KiB)
  • /templates/bt_travel/html/mod_bt_login/js/jquery.simplemodal.js (7.1 KiB)
  • /media/com_acymailing/js/acymailing_module.js?v=441 (6.9 KiB)
  • /media/jui/js/jquery-migrate.min.js (5.5 KiB)
  • /components/com_k2/js/k2.js?v2.6.7&sitepath=/ (4.5 KiB)
  • /plugins/system/t3/base/js/menu.js (3.7 KiB)
  • /plugins/system/t3/base/js/script.js (3.5 KiB)
  • /media/system/js/core.js (3.2 KiB)
  • /media/system/js/calendar-setup.js (2.5 KiB)
  • /modules/mod_btimagegallery/tmpl//js/jquery.fancybox-thumbs.js (2.0 KiB)
  • /plugins/system/t3/base/js/off-canvas.js (1.7 KiB)

I put the following in my .htaccess

<IfModule mod_expires.c>

<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">

ExpiresActive On

ExpiresDefault "access plus 10 years"

</FilesMatch>

</IfModule>

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1

<IfModule mod_expires.c>

RewriteCond %{REQUEST_FILENAME} -f

RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1

</IfModule>

<IfModule !mod_expires.c>

RewriteCond %{REQUEST_FILENAME} -f

RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt))$ smartoptimizer/?$1

</IfModule>

</IfModule>

<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">

FileETag none

</FilesMatch>

Does anybody has any idea how can i solve this issue?? So put the java to the bottom of the page and put a cachevalidator at the js files.

Kind regards,

Michel

Share this post


Link to post
Share on other sites