so this concept of compressing data, it saves bandwidth but how about client 
and server side processing time.

more server load?
faster to decompress on client than download more?

----- Original Message ----
From: Andrew Scott <[EMAIL PROTECTED]>
To: CF-Talk <[email protected]>
Sent: Wednesday, April 25, 2007 2:58:36 PM
Subject: Re: HTTP Compression with CF7

You know Pete...

If you are going to give something, some credit would have been good:-)

http://www.andyscott.id.au/index.cfm/2006/9/12/Proof-of-Concept




On 4/26/07, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote:
>
> Roll your own.  Here's a code snippet from my application.cfc:
>
> <cffunction name="onRequestEnd">
> <!--- gzip file compression for non-logged in users and UA's that accept
> gzip encoding
>    Compression does odd things to the admin navbar and keeps the debug
> output from being shown.
>   --->
> <cfargument name="thePage" type="string" required="true">
> <cfset var fileOut = '' />
> <cfset var out = '' />
> <cfif CGI.HTTP_ACCEPT_ENCODING CONTAINS "gzip" AND
> len(trim(getauthuser())) EQ 0>
>   <cfscript>
>    pageOut = getPageContext().getCFOutput().getString();
>    fileOut = createobject("java", "java.io.ByteArrayOutputStream").init();
>    out = createobject("java","java.util.zip.GZIPOutputStream
> ").init(fileOut);
>    out.write(variables.pageOut.getBytes(), 0, len(
> variables.pageOut.getBytes()));
>    out.finish();
>    out.close();
>   </cfscript>
>   <cfheader name="Content-Encoding" value="gzip">
>   <cfcontent type="text/html" reset="true"
> variable="#fileOut.toByteArray()#">
>   <cfreturn true />
> </cfif>
> <cfif isUserInRole("Administrators") OR isUserInRole("Deity")>
>   <cfinclude template="/inc/security_status.cfm">
> </cfif>
> </cffunction>
>
> As you can tell from the comment, there were portions of code that had
> issues with the gzip encoding, but overall it works quite well.
>
> pete
>
>
> On 4/25/07, Jacob <[EMAIL PROTECTED]> wrote:
> >
> > Can you run HTTP Compression on IIS with CF 7?
> >
> > I know CF4 and CF5 has a problem, but how about CF7?
> >
> > I downloaded a couple ISAPI Filters for HTTP Compression for IIS, but it
> > does not work.  When I install it on a IIS server not running CF, HTTP
> > Compression runs fine.
> >
> > TIA...
> >
> > Jacob
> >
> >
> >
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276272
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to