Michel, if you go into your browser's network debugging console(usually
CTRL+SHIFT+I in modern browsers) and look at the response headers for the
ajax request, do you see a cache-control header? If so, what does it say?
If you're seeing something similar to the following:
Cache-control:no-cache
t
Hi Paul,
You wrote:
> Helle Michel,
>
> Are you calling $r->no_cache before any response data has been sent?
Yes. Before setting the content type to text/html.
> When you say the browser receives a '0' in the response, what do you mean
> exactly?
My Ajax responder sends some fields separate
I am going to echo Paul's comments. If you've used a print anywhere in your
code prior to invoking $r->no_cache(1); then it's not going to work because
sending of even a single byte of content will cause apache to send the
response headers and you are then unable to modify the response headers
once
Weird.
Try the following instead:
$r->headers_out->set('Pragma' => 'no-cache');
$r->headers_out->set('Cache-Control' => 'no-cache');
I've actually never used 'no_cache' before but instead used the above two
lines.
Let me know if it works for you.
Thanks,
Paul
On Mon, Sep 7, 2015 at 4:39 PM,
Hello Michel,
Are you calling $r->no_cache before any response data has been sent? When
you say the browser receives a '0' in the response, what do you mean
exactly?
Thanks,
Paul
On Mon, Sep 7, 2015 at 4:15 PM, Michel Jansen
wrote:
> if i add $r->no_cache(1) to an ajax responder perl script