my bad, I am just being ignorant here, I was looking at the response header, my bad, it's working perfectly fine. apologies
On Sun, Apr 8, 2012 at 5:48 PM, Mandeep Sidhu <[email protected]>wrote: > Jacques, > > I analyzed the URL being accessed by my application, I am trying to > consume a version of jquery from google's CDN. > URL: http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js > > the size I am getting back is around 72KB, which is not gzipped, although > Ofbiz is sending gzip as part of content-encoding. Here's what OFbiz is > requesting > > Vary Accept-EncodingContent-EncodinggzipContent-Typetext/javascript; > charset=UTF-8 Last-ModifiedMon, 02 Apr 2012 18:24:28 GMTDateWed, 04 Apr > 2012 16:56:11 GMT ExpiresThu, 04 Apr 2013 16:56:11 GMT > X-Content-Type-OptionsnosniffServer GFE/2.0Content-Length24605 > X-XSS-Protection1; mode=block Cache-Controlpublic, max-age=31536000Age > 328756 > One thing to note here is that it is not sending the user-agent header, > and surprisingly google's CDN doesn't understand this and expects an > established user-agent header, > I used some tool to hit the same url and sent user-agent explicitly, > surprisingly the received file size was 25Kb. > > do you've any idea as to why OFBIZ(tomcat server ) is omitting the > user-agent header. > > Regards, > Mandeep > > > > On Sun, Apr 8, 2012 at 2:43 PM, Jacques Le Roux < > [email protected]> wrote: > >> You are missing a point Mandeep. >> >> OFBiz is already compressing text files. This is done through the >> embedded Tomcat. See in ofbiz-containers.xml >> {code} >> <property name="compressableMimeType" value="text/html,text/xml,** >> text/plain"/> >> <property name="compression" value="on"/> >> {code} >> >> Reference: >> http://tomcat.apache.org/**tomcat-7.0-doc/config/http.**html<http://tomcat.apache.org/tomcat-7.0-doc/config/http.html> >> >> So my proposition was only to add an yui-compressor-ant-task to compress >> js/css files as described here >> http://developer.yahoo.com/**yui/compressor/<http://developer.yahoo.com/yui/compressor/> >> >> Note that for bigest files we already use compressed versions (ending by >> min.js, see framework/common/widget/**CommonScreens.xml and >> specialpurpose/ecommerce/**widget/CommonScreens.xml) >> >> >> Jacques >> >> From: "Mandeep Sidhu" <[email protected]> >> >>> created Jira 4792 >>> >>> https://issues.apache.org/**jira/browse/OFBIZ-4792<https://issues.apache.org/jira/browse/OFBIZ-4792> >>> but still this will only compress the files Jacques, what if the >>> application is consuming external jss/css files, if the remote server has >>> the capability to server GZip encoded content to the requesting client, >>> we'd need to send the GZip encoding option in the http header for which I >>> believe Ofbiz needs to be touched. >>> >>> Correct me if I am wrong. >>> >>> Regards, >>> Mandeep Sidhu >>> >>> On Sun, Apr 8, 2012 at 11:21 AM, Jacques Le Roux < >>> [email protected]> wrote: >>> >>> I'd suggest to do it also for css >>> http://code.google.com/p/yui-****<http://code.google.com/p/yui-**> >>>> compressor-ant-task/ <http://code.google.com/p/yui-** >>>> compressor-ant-task/<http://code.google.com/p/yui-compressor-ant-task/> >>>> > >>>> You could create a Jira and contribute https://cwiki.apache.org/** >>>> confluence/display/OFBADMIN/****OFBiz+Contributors+Best+****Practices< >>>> https://cwiki.**apache.org/confluence/display/** >>>> OFBADMIN/OFBiz+Contributors+**Best+Practices<https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices> >>>> >, >>>> >>>> this >>>> would be appreciated of course, not only for eCommerce BTW... >>>> >>>> Jacques >>>> >>>> From: "Mandeep Sidhu" <[email protected]> >>>> >>>> Hi, >>>> >>>>> >>>>> I was wondering if it is possible to reduce the size of external >>>>> javascript's being fetched by making use of GZip encoding. >>>>> >>>>> The feeding server does understand and responds to GZip encoding, >>>>> however >>>>> Ofbiz is not requesting the content in GZip format. >>>>> >>>>> Can anybody please guide me as to what all modifications I need to >>>>> make so >>>>> that Ofbiz will include the GZip encoding option in the http header >>>>> while >>>>> requesting the external javascript file ? >>>>> >>>>> Regards, >>>>> Mandeeep Sidhu >>>>> >>>>> >>>>> >>> >>> -- >>> Mandeep Singh Sidhu >>> >>> > > > -- > Mandeep Singh Sidhu > -- Mandeep Singh Sidhu
