Re: [Rabbit-proxy-users] Can RabbIT compress images that doesn't allow caching? (fwd)
Brought to you by:
ernimril
From: Robert O. <ro...@kh...> - 2003-05-26 20:03:15
|
>I use RabbIT all the time. It compresses most images I download. Once >a while, I notice some images that are not compressed. For example, >most images on the New York Times web site (www.nytimes.com) is not >compressed by RabbIT. > Seems like it, yes. >I think it's because they set the attributes to >not-cacheable. i.e. the "maycache" variable in ImageHandler.java is >false for those images. > Correct, maycache is false. >Is there a way for RabbIT to compress those >images? It'll greatly increase the speed of those web sites. If it >requires some code change, I can try to do it if someone can give me >some guidance. > It is possible to compress thoose pages. To find the reason why they are not I look at the http header, for theire logo my mozilla sent this: GET http://graphics7.nytimes.com/images/section/homepage/NYT_home_banner.gif HTTP/1.1 Host: graphics7.nytimes.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030411 Cookie: RMID=831809a8318c3ec003d11da8; tpopunder_orbitz20-nyt4=1053978272; spopunder=1 ....<a lot of other headers>.... If you look in the HTTPBaseFilter you will see that it tries to disable caching for sites that use cookie based ids. That was originally added to keep hotmail users happy. Im not sure its needed anymore. Basically the site is broken if it does not send correct headers back. You can try to remove the check at HTTPBaseFilter.java:310, but it may break some sites. You could also try to restrict the test done. /robo |