ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How to find the total number of HTTP requests?

user-image
تم إضافة السؤال من قبل Julfkar Moh Umar , Sr. Software Engineer , Aakash Edutech Private Limited
تاريخ النشر: 2016/01/13
Michael Jose Mian
من قبل 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.

المزيد من الأسئلة المماثلة