Welcome Guest, Not a member yet? Register   Sign In
Problems with compression and ajax
#1

[eluser]Giacomo[/eluser]
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

[eluser]bijon[/eluser]
Hi,

Can you post some code about your problem .
#3

[eluser]Giacomo[/eluser]
[quote author="bijon" date="1188981821"]Hi,

Can you post some code about your problem .[/quote]
Nothing of special. In "config.php" I have "$compression = true", and in controller I have a function like this:
Code:
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

[eluser]Michael Wales[/eluser]
turn off output compression?
#5

[eluser]Giacomo[/eluser]
[quote author="walesmd" date="1189014255"]turn off output compression?[/quote]
Thanks...=(

My question is if there is a way to turn on output compression and use ajax...
#6

[eluser]Michael Wales[/eluser]
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

[eluser]Giacomo[/eluser]
[quote author="walesmd" date="1189029875"]Does output compression work without your Ajax requests?

There are no inherent malfunctions between the two - it must be a misconfiguration on your server...[/quote]
Yes, output compression works without ajax.
#8

[eluser]victorche[/eluser]
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:
Quote:Do not "echo" any values with compression enabled.
So, how to use ajax and compression?




Theme © iAndrew 2016 - Forum software by © MyBB