Speed Up The Web Page

PageSpeed Insights

.htaccess (public)/wp

Set time to expire at least 30 days.

# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault “access plus 5 seconds”
ExpiresByType image/x-icon “access plus 2592000 seconds”
ExpiresByType image/jpeg “access plus 2592000 seconds”
ExpiresByType image/png “access plus 2592000 seconds”
ExpiresByType image/gif “access plus 2592000 seconds”
ExpiresByType application/x-shockwave-flash “access plus 2592000 seconds”
ExpiresByType text/css “access plus 604800 seconds”
ExpiresByType text/javascript “access plus 2592000 seconds”
ExpiresByType application/javascript “access plus 2592000 seconds”
ExpiresByType application/x-javascript “access plus 2592000 seconds”
ExpiresByType text/html “access plus 600 seconds”
ExpiresByType application/xhtml+xml “access plus 600 seconds”
</ifModule>
# END Expire headers

# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<FilesMatch “(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$”>
ExpiresActive On
ExpiresDefault A2592000
</FilesMatch>
<filesMatch “\.(x?html?|php)$”>
Header set Cache-Control “private, must-revalidate”
</filesMatch>
</ifModule>
# END Cache-Control Headers

Besides desktop page speed, we need to optimize the mobile pages also.

pagespeed     after optimization

Minify the css and js. Place small css on the header instead of using css file.

place style     use asynchronous ads

For desktop optimization

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.