Mark, thanks I was just about to switch them thanks.

 

 

 

Senior Coldfusion Developer

Aegeon Pty. Ltd.

www.aegeon.com.au

Phone: +613  8676 4223

Mobile: 0404 998 273

 


From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Mark Mandel
Sent: Tuesday, 12 September 2006 3:05 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Compressing the output to the browser via CF

 

Got it... it allhad to do with the headers -

<cfcomponent name="Application">

<cffunction name="onRequestEnd" returntype="boolean" output="true">
<cfargument name="thePage" type="string" required="true">

    <cfscript>
        var fileOut = '';
        var out = '';

        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()));

        // Complete the GZIP file
        out.finish();
        out.close();
    </cfscript>

    <cfheader name="Content-Encoding" value="gzip">
    <cfcontent type="text/html" reset="true" variable="#fileOut.toByteArray()#">
 </cffunction>

</cfcomponent>

Enjoy

Mark

On 9/12/06, Andrew Scott < [EMAIL PROTECTED]> wrote:


Mark no go, however I was reading somewhere that I may need to use the
getRequest().getRequest() and flush it that way and write the content in
application.cfc



Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273






--
E: [EMAIL PROTECTED]
W: www.compoundtheory.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to