Hello.....htacces
3.)Save the file
4.) Now check your website speed the google website test tool pie chart will be in orange color
5.) Now Open this site https://cssminifier.com/ and copy paste your css codes in this it will minify your css codes after minifing css,javascript codes save all the files and again check your website
speed....... . .
. Njoy the .htacces speed
| How to improve site speed with .htacces |
How to improve site speed with .htacces
Now a days all the seo peoples are suffering about the result of website speed test results when we are trying to test our site in google site speed tester will seelot of errors in the sites and the pie chart will show in red color this all the buddys are suffering the same problm To solve these issues i created a new .htaccess file this htaccess will improve your site speed to green color pie chartImprove your site speed with single .htacces
Here iam giving the .htacces to improve the site speed copy the code and paste in your root folder .htaccess fileRewriteEngine On RewriteCond %{SERVER_PORT} !=443 RewriteCond %{HTTP_HOST} ^(www\.)?domin\.com$ [NC] RewriteRule ^$ https://www.domin.com%{REQUEST_URI} [R,L] # compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_include mime ^text/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_include handler ^cgi-script$ </ifModule> ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/pdf "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 2 days" </IfModule> ## EXPIRES CACHING ## <IfModule expires_module> ExpiresActive on ExpiresDefault "access plus 1 week" </IfModule>
2.) Replace the domin with your domin name
3.)Save the file
4.) Now check your website speed the google website test tool pie chart will be in orange color
5.) Now Open this site https://cssminifier.com/ and copy paste your css codes in this it will minify your css codes after minifing css,javascript codes save all the files and again check your website
speed....... . .
. Njoy the .htacces speed
No comments:
Post a Comment