Tips for Better Page Speed using .htaccess - I tried few not good !
-
This post is deleted! -
I looked at your gtmetrix report. There is nothing in it that can be changed with a htaccess file. It is the use of the CDN which is killing your page speed metrics. The CDN does not allow you to set expires or compression, plus more than likely they add their cookie to your already heavily cookied content. You could raise your scores by not using the CDN.
-
http://www.webpagetest.org/result/130922_NR_6N/
http://www.webpagetest.org/testlog.php?days=7&filter=www.animhut.com
Your site makes some 140+ requests which is a bit excessive imho, and has way too many scripts loading at once. perhaps try to eliminate at least 20-30 of these requests if at all possible.
i notice you use disqus, that is one huge famous thing if you want lag on these things. Try to go with their asynchronous version of the code or altogether skip and come up with a better alternative. you could make a test copy of the site on a non-indexed server and just trying skipping the disqus script to see what a difference it makes, it may just be enough!
I further believe you are not wisely using images, imho you have way too many useless images for their size. You can use any of the following to improve this:
- convert everything to progressive jpegs
- reduce dimensions
- use actual image dimensions (i see for the most part you have done this, but generally a good rule to keep aware about)
- and use services like Yahoo Smushit to get more compressed images or better yet use google pagespeed service that will use the cutting edge of technology to convert all of your content to a more polished and optimized type.
- use less photos, only when it strategically and fundamentally matters, I rather see a plain text page load fast for the data that I need, as opposed to wait around for the useless pictures to load with it.
- Just proper image optimization could shave off a good bit of the lag.
I would also try to use CDN in a more wise manner, I can see that you are probably overusing it and/or your CDN is not properly up to task.
pay close attention to this Leverage browser caching of static assets: 50/100
i ran a few different locations and browsers on these tests and with inconsistent speed results and fails, so use the TEST HISTORY section to look up these public results so u can decide exactly where the problem seems to be. The most common fails are your target.
lastly, I would ensure of my entire code health by running it through http://jslint.com/ or any other similar and trusted tool. A lot of these third party scripts are not really that well written.
at the very least and worst acceptable speeds in today's ADHD user market, your Document Complete time should more be like 10-15s as opposed to 25-45s, preferably under 10 seconds, and optimally 2-5 seconds. ESPECIALLY if you are noticing more and more mobile users like here in the states.
hope this helps
-
Thank you for the answers - get to know more about this issue.
I have optmized it ! can you see the difference !
And when i asked CDN Service that ! I have to ask Hosting for expire date in the file.
and getting consume 2+GB only getting 1K visits only and wasted !
For Google Adsense i use async Code ! But for other sites how i selecte them and
Avoiding lots of script whic i do not like ! - i dont know where to do that !
Should i delete the file from the server ?
-
Have a look at adding this to your .htaccess file. It will compress files before sending them to a browser making the download time of your website quicker.
<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 handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.gzip.</ifmodule>