禁用Recieving缓冲在Firefox(或其他浏览器) [英] Disable Recieving Buffer in Firefox (or other browsers)

查看:202
本文介绍了禁用Recieving缓冲在Firefox(或其他浏览器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了与Web浏览器缓存(不chaching)。

I got trouble with web browsers buffering (not chaching).

我把这个PHP脚本:

sleep(5);
echo '1st step';
echo (str_repeat(' ',256));
sleep(5);
echo '<br />';
echo '2nd step';

输出缓冲器PHP的禁止(我们会在确认以后)

output buffer is disabled on php (we will confirm that later)

含铬12和Firefox 5都调用此脚本时
我得到这个结果:

when calling this script with both Chromium 12 and Firefox 5 I got this result :

在等待动画界(灰色的)在5秒〜运行
那么转移动画圆(橙色的)期间〜5秒运行
最后我拥有了整个显示结果。

the 'waiting' animated circle (the grey one) runs during ~5sec then the 'transferring' animated circle (the orange one) runs during ~5sec and finally i have the whole result displayed.

我最初的目标是,像您期望,等待5秒,然后请参阅第1步中显示,
再次等待5秒,然后参阅第2步显示。

My initial goal was, as you expect, to wait 5sec, then see "1st step" displayed, wait 5sec again and then see "2nd step" displayed.

线索


  • PHP或Apache不缓冲任何东西从动画圆开关
    等待到recieving5秒后,(所以浏览器没有收到东西
    从第一步回声!)

  • php or apache doesn't buffer anything as the animated circle switch from 'waiting' to 'recieving' after 5sec (so the browser did recieve something from the "1st step" echo !)


  • 我试图设置Firefox的缓存大小为0,这样的缓存机制将被绕过..但仍然没有工作。

  • I tried to set Firefox Cache size to 0 so the cache mechanism would be bypassed.. but still no working.

我读了一些浏览器可能会等待,直到他们收到256字节,他们开始显示内容之前。这就是为什么我添加了回声(str_repeat('',256))..但它并没有解决任何问题。

I read that some browser may wait until they recieve 256 bytes before they start display the content. That's why i added "echo (str_repeat(' ',256))".. but it doesn't solve anything.

我也试过在0 Firefox关于设置network.buffer.cache.count和network.buffer.cache.size选项:配置,我不知道如果这些选项被rellated我的问题,但它仍然没有工作..

I also tried to set network.buffer.cache.count and network.buffer.cache.size options at 0 in firefox about:config, i don't know if those option was rellated to my problem but it is still not working..

任何想法?

谢谢,

推荐答案

呵呵,我想我需要答案的答案,而不是评论,这样你就可以接受了。

Oh, I guess I need to make the answer an answer, not a comment, so you can accept it.

HTML5的字符集嗅探缓冲区大小为512字节。因此,应对需要要么有512个字节的填充或设置字符集(通过&LT;&荟萃GT; 标记或HTTP标头)。

The HTML5 charset sniffing buffer size is 512 bytes. So the response needs to either have 512 bytes of padding or set a charset (via <meta> tag or HTTP header).

这篇关于禁用Recieving缓冲在Firefox(或其他浏览器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆