Did you know you can use PHP flush function to flush buffer early on your server to speed site loading. I was reading this amazing Yahoo! guide about best practices for making web pages load faster, and though most other tips were common and practiced by most webmasters for faster site loading, this was new to me.
How does PHP Flush work?
When a page is requested on your server, it takes 200-500ms for the backend server to stitch the HTML page. While the browser is idle as it waits, you can use PHP function flush() which allows you to send your partially ready HTML response to the browser so that the browser can start fetching components while your backend is busy with the rest of the HTML page. The benefit is mainly seen on busy backends or light frontends. Learn more about PHP flush() function, its uses and limitations.
Where to Add PHP Flush in HTML
</head> <?php flush(); ?> <body>
Have you tried PHP flush on your server? Have you noticed a difference in site speed? Every millisecond counts, especially since site speed is a Google search engine ranking factor now.