install defer.js on linux server

Only you install page speed and open in virtual host

 

<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot “/var/www/html/example/”
ServerName staging.example.com
<Directory “/var/www/html/example/”>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ModPagespeedDisallow “*/phpmyadmin/*”
ModPagespeedEnableFilters defer_javascript
ErrorLog /var/log/mergingbranch-error_log
CustomLog /var/log/mergingbranch-access_log common
RewriteEngine on
RewriteRule ^(.+)\.([\d]*)\.(js|css)$ $1.$3
# RewriteEngine on
#RewriteCond %{ENV:HTTPS} !on [NC]
#RewriteRule ^(.*?)\/(.*)$ https://staging.example.com/$2 [R=301,L]

</VirtualHost>

Advertisements