Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9198581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:19:08+00:00 2026-06-17T22:19:08+00:00

For example, this doesn’t work (Firefox 21, IE8): <?php function flush_buffers(){ ob_end_flush(); ob_flush(); flush();

  • 0

For example,

this doesn’t work (Firefox 21, IE8):

<?php
function flush_buffers(){
    ob_end_flush();
    ob_flush();
    flush();
    ob_start();
}  
ob_start();
echo 'Text 1<br />';
flush_buffers();
Sleep(2);
echo 'Text 2<br />';
flush_buffers();
Sleep(2);
echo 'Text 3<br />';
flush_buffers();
Sleep(2);
echo 'Text 4<br />';
?>

But this one works:

<?php
function flush_buffers(){
    echo str_pad('',4096);
    ob_end_flush();
    ob_flush();
    flush();
    ob_start();
}  
ob_start();
echo 'Text 1<br />';
flush_buffers();
Sleep(2);
echo 'Text 2<br />';
flush_buffers();
Sleep(2);
echo 'Text 3<br />';
flush_buffers();
Sleep(2);
echo 'Text 4<br />';
?>

I have PHP 5.4.11 VC9 and Apache 2.4.3 (apacheLounge) running on Win XP SP3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:19:10+00:00Added an answer on June 17, 2026 at 10:19 pm

    Some browsers include their own internal buffer in order to download and display more efficiently with less choppiness. In most cases, this buffer is 4Kb, or 4096 bytes.

    What str_pad('',4096) does is write 4,096 spaces to the output. Since it’s HTML, these spaces collapse into a single space.

    Overall, this behaviour should NOT be relied upon. Browsers are for viewing webpages, not bastardising into console terminals.

    Also, why are you writing </br>? There is no such thing as an end <br> tag, and the self-closing version is <br />

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created this example The remove function doesn't work, and I can't figure out
I've created this simple example program, but this doesn't work. it won't connect. any
Ideally I want a function something like the following (this example doesn't compile): void
This doesn't work: $(#elementId).attr(required, true); In both Chrome and Firefox, the DOM produces either
I've tried implementing this example , but the progress never displays. My page doesn't
I'm using this simple node.js code example but I don't understand why FireBug doesn't
I'm trying something like this, but this example does not work. jsObj = {};
everyone, i have no idea why this doesn't work hopefully someone here can help
This example works fine: static char *daytab[] = { hello, world }; This doesn't:
What is the meaning of (char)0 . For example what does this mean? array[1]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.