views:

448

answers:

3

Hi,

I use the google cdn url for getting the jquery / ui. But when I tested using YSlow I found that the both js/css is not gzip though other components from server were gzipped and had expries(it does a content modified check)..should i have to added anything in the url to let know the browser that it should cache../get the gzip content..

THnks ManickamPR.

+1  A: 

Getting the gzip or not is dependent upon both the browser and the server. If the browser can't accept gzip, it won't request it. If the server doesn't support gzipping, then even if the browser requests it, it won't respond with gzip. There's nothing you can do about it. Also the expires header is set on the server side, so there is nothing you can do about it either.

Thomas
+5  A: 

Looks gzipped and properly set to expire to me...

http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js

Last-Modified: Mon, 08 Jun 2009 20:49:31 GMT
Content-Type: application/x-javascript; charset=UTF-8
Expires: Fri, 09 Jul 2010 17:22:01 GMT
Date: Thu, 09 Jul 2009 17:22:01 GMT
Cache-Control: public, max-age=31536000
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
Server: GFE/2.0

200 OK
ceejayoz
A: 

Yes, it is dependent on the request message send by the browser, if it will send the Accept encoding to gzip, it might get it if the server support it.

e.g take this http request message.

GET google HTTP/1.1

Host: aajtak.intoday.in

Accept: /

Accept-Charset: iso-8859-1, utf-8; q=0.7, *; q=0.7

Accept-Encoding: gzip, deflate, x-gzip, identity; q=0.9

Accept-Language: en;q=1.0,zh-cn, zh;q=0.5

User-Agent: Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413

Thanks supermanhelp.com