Subscribe:

Ads 468x60px

Showing posts with label light webpage. Show all posts
Showing posts with label light webpage. Show all posts

Tuesday, September 4, 2012

Size of Web Page through browser


These days, everyone wants to make their webpage/website as light as possible. The lightier the page is best it is considered to provide speedy download and fast in dynamics. These led to the era of javascript, jquery library and various AJAX triumphs. But how to know that what is the exact size of webpage that is coming from the server on request to browser.
Here are few ways to know Size of WebPage:
1. Using PHP and Curl:
curl_getinfo($page, CURLINFO_SIZE_DOWNLOAD)
By including this code:

   <?php
//<in place of http://usefultechtalk.blogspot.in enter your web URL>
$curl = curl_init('http://usefultechtalk.blogspot.in');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_exec($curl);
//get the download size of page
print("Download size: " . curl_getinfo($curl, CURLINFO_SIZE_DOWNLOAD) .'<br>');
?>


2. If you are on Mozilla Firefox, Install Firebug addon. Once Installed in the Net Tab as shown below
One can get the Size of WebPage. You can see the No. of Request in GET form and time to fetch the request.



[Please like/share/comment if you find it useful !]