Leverage browser caching for external JavaScripts

Hi friends

I optimized my site (HafezNa.ir)…for all items
but I get a “Leverage browser caching” warning for an external JS
(for example for “google analysis” or statcounter)

how can solved it??

You can’t. Just make sure you are loading the scripts asynchronously and that’s the best you are going to be able to do.

Looking at your site, one big win you can get will be fixing the blocking issue with IE conditional comments. You have:

<!--[if IE 7.0]><style>.clearfix { display: inline-block; } /* IE7xhtml*/</style><![endif]-->

directly after your external css and that is causing all versions of IE to not load the rest of the content on the page until the css finishes loading. If you add an empty conditional comment to the top of the page it should “unstick” IE and load more in parallel.

More info here: http://www.phpied.com/conditional-comments-block-downloads/

Thanks,

-Pat

Thank you very much for your care and great suggestion…I didn’t know that :rolleyes:

you are right:
http://www.webpagetest.org/result/111116_SN_26MA2/1/details/

So According to the guide I must change it to this form:

[code]

. . . . . . body.bd .main {width: 980px;} body.bd #ja-wrapper {min-width: 980px;} [/code]

Is it true?

Thank you very much for your care and great suggestion…I didn’t know that :rolleyes:

you are right:
http://www.webpagetest.org/result/111116_SN_26MA2/1/details/

So According to the guide I must change it to this form:

[code]

. . . . . . body.bd .main {width: 980px;} body.bd #ja-wrapper {min-width: 980px;} [/code]

Is it true?

Thank you very much for your care and great suggestion…I didn’t know that :rolleyes:

you are right:
http://www.webpagetest.org/result/111116_SN_26MA2/1/details/

So According to the guide I must change it to this form:

[code]

. . . . . . body.bd .main {width: 980px;} body.bd #ja-wrapper {min-width: 980px;} [/code]

Is it true?

I don’t know why I banned from The forums…

any way…
thank you very much Pmeenan
It was a great help for me,I didn’t know that note;

The results was great:

before fix:
http://www.hafezna.ir/img/before.jpg

after fix:
http://www.hafezna.ir/img/after.jpg

can you check my source agian please…
I welcome your valuable suggestions and comments :slight_smile: