http - How to get the total data consumed to render a web page in php -


Displays the size of all download CSS, JS and images in an HTTP request in the browser console bytes. How to get this data php?

Any help would be appreciated.

Enter image details here

< Div class = "post-text" itemprop = "text">

If you are requesting external using HTTP (as the element is being checked) you can parse the HTTP content-length header To send the HEAD request instead of the header or GET / POST, the HTTP head will not return the content of the request file, but will only provide header information that can save a lot of resources if you Do not care about the content of the page you are requesting. If you want content, then just send a GET / POST request and always respond that parse the response header.

If you are wondering how much PHP is running on your system, you can use that which will show you file size in bytes. If the file is not known, then FALSE will return.

  int filesize (string $ filename)    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -