views:

31

answers:

1

Now I am trying to implement High web site performance following YSlow rules. In terms of Expires Header, I have configured in nginx like the following:

if ($request_uri ~* ".(ico|css|js|gif|jpe?g|png)\?[0-9]+$") { expires max; break; }

Yes, I got the good result because I could not see css and javascript files followed by timestamp at the end of file any more and it passed, but I still have problems with images which are retrieved from another domain. They still have no expires. Anyone knows how to deal with this problem? Thanks!

+2  A: 

You can't affect the expires headers of images served from other domains; the configuration of those assets is up to the administrator of the domain that is serving them.

Chris Heald
but what if I would like to add expire header to those images. Can I do that?
Sinal
only if you control the server the images are delivered from
Toby Hede
Sure, I tested a while ago, I noticed first request was from the sever but later it was from cache. However, in YSlow Add Expire headers still fails. Any idea?
Sinal