Current time: 11-16-2019, 10:01 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Leverage browser caching for external JavaScripts
11-15-2011, 08:42 PM
Post: #1
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??
Quote this message in a reply
11-16-2011, 01:35 AM
Post: #2
RE: Leverage browser caching for external JavaScripts
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:

Code:
<!--[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-commen...downloads/

Thanks,

-Pat
Visit this user's website Find all posts by this user
Quote this message in a reply
11-18-2011, 06:33 AM
Post: #3
RE: Leverage browser caching for external JavaScripts
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 Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)