ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problems with compression and ajax

September 04, 2007 1:53pm

Subscribe [2]
  • #1 / Sep 04, 2007 1:53pm

    Giacomo

    7 posts

    Hi everybody, I have a problem with output compression and ajax (I use prototype). My problem is that ajax creates problems to “ob_start” function because I use “echo” istruction in ajax calls.

    Somebody has this problem? How can I solve it?

    Bye and thanks

  • #2 / Sep 05, 2007 12:43am

    bijon

    46 posts

    Hi,

    Can you post some code about your problem .

  • #3 / Sep 05, 2007 5:47am

    Giacomo

    7 posts

    Hi,

    Can you post some code about your problem .

    Nothing of special. In “config.php” I have “$compression = true”, and in controller I have a function like this:

    function ajax_response() {
     echo 'something';
    }

    Obviously when I call this function I get “ob_start” error, cause with compression it’s not possible to use “echo” statement.

  • #4 / Sep 05, 2007 9:44am

    Michael Wales

    2070 posts

    turn off output compression?

  • #5 / Sep 05, 2007 1:16pm

    Giacomo

    7 posts

    turn off output compression?

    Thanks…=(

    My question is if there is a way to turn on output compression and use ajax…

  • #6 / Sep 05, 2007 2:04pm

    Michael Wales

    2070 posts

    Does output compression work without your Ajax requests?

    There are no inherent malfunctions between the two - it must be a misconfiguration on your server…

  • #7 / Sep 05, 2007 2:08pm

    Giacomo

    7 posts

    Does output compression work without your Ajax requests?

    There are no inherent malfunctions between the two - it must be a misconfiguration on your server…

    Yes, output compression works without ajax.

  • #8 / Feb 01, 2012 5:19pm

    victorche

    147 posts

    sorry for posting in this old thread but… I have the same problem
    I have simple ajax, where I’m returning the values with “echo”. But if I want to use “compress_output”, it gives me an error. And like it’s written in the comment:

    Do not “echo” any values with compression enabled.

    So, how to use ajax and compression?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases