Mar articles related to web optimization
Empty Buffer early if your page is in php
What does Configure ETags mean on my website
What is Gzip compression and what is it for
How to add Expires or Cache-Control Header
Use Content Delivery Network on your website
How to reduce the number of DOM elements on my website
How to avoid redirects on your site
When users request a page, it can take 200 to 500 milliseconds for the server to create the html code.
During this time, the browser is inactive as it awaits the arrival of the data. In PHP you have the flush () function. The one that allows you to send a partially ready HTML response to the browser so the browser can start looking for the components while in the background it is busy with the rest of the HTML page. The benefit is mainly found in busy backgrounds or light covers.
A good place to consider this is immediately after the header, it is generally easier to produce and allows you to include any CSS or Javascript file so that the browser starts searching in parallel while it is still processing in the background.
Example:
… ! - css, js -
/head
? php flush (); ?
body
… ! - content -
Date update on 2020-11-13. Date published on 2020-11-13. Category: Computer class Author: Oscar olg Fuente: tecnologia