Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to find the total number of HTTP requests?

user-image
Question added by Julfkar Moh Umar , Sr. Software Engineer , Aakash Edutech Private Limited
Date Posted: 2016/01/13
Michael Jose Mian
by Michael Jose Mian , Library Assisant (Part time) , Elite International School

  1. You should be aware that caching, and the differences in the way in which browsers, obey and disobey caching directives can lead to different resource requests generated for the same page, by different browsers at different times, might be worth considering.

  2. If the purpose of your project is simply to measure this metric and you have control over the website in question you can pass every resource through a php proxy which can count the requests. i.e you can follow this pattern for ssi, scripts, styles, fonts, anything.

  3. If point2 is not possible due to the nature of your website but you have access, then how about parsing the HTTP log? I would imagine this will be simple compared with trying to parse a html/php file, but could be very slow.

  4. If you don't have access to the website source / http logs, then I doubt you could do this with any real accuracy, huge amount of work involved, but you could use curl to fetch the initial HTML and then parse as per the instructions by DaveRandom.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.