kaieivindm
Well-known member
So after I did some tests on my site, I noticed that I did not take advantage of browser cache nor defer parsing of javascripts.
After some googling and trying to understand how to fix this in a good way, I found this:
Browser caching
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/gif "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 1 week"
ExpiresByType text/html "access 1 week"
ExpiresByType text/x-javascript "access 1 week"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 week"
</IfModule>
## EXPIRES CACHING ##
Obviusly 1 week can be changed with year, months etc.
Is there any experts out there that can pinpoint me to a good number here?
Is my site from GTmetrix as of now.
Up from B 76% after I entered the above lines in my ".httaccess" file.
But on the defer parsing of javascripts, does it basically just mean I should move then to the end of my html file/php to load them at the end? So the page content ++ can load first? Is that the high level of it?
Thanks!
After some googling and trying to understand how to fix this in a good way, I found this:
Browser caching
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/gif "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 1 week"
ExpiresByType text/html "access 1 week"
ExpiresByType text/x-javascript "access 1 week"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 week"
</IfModule>
## EXPIRES CACHING ##
Obviusly 1 week can be changed with year, months etc.
Is there any experts out there that can pinpoint me to a good number here?
Is my site from GTmetrix as of now.
Up from B 76% after I entered the above lines in my ".httaccess" file.
But on the defer parsing of javascripts, does it basically just mean I should move then to the end of my html file/php to load them at the end? So the page content ++ can load first? Is that the high level of it?
Thanks!