What is relation between number of HTTP packets and number of objects in a web page? asked 20 Apr '11, 13:42 A B |
3 Answers:
None. answered 20 Apr '11, 13:47 Jaap ♦ |
You might try to filter on GET/POST requests, for example using
Since every object needs to be requested by either GET or POST request that filter should allow you to find out how many objects were requested in a trace file. If your trace file contains more than one page you have to exclude those packets of pages you don't want. If you're lucky your webbrowser used one single TCP session (by using HTTP1.1 keep-alive) that contains all elements of one page allowing you to filter on. If not, you're in for some additional filtering work. answered 20 Apr '11, 16:34 Jasper ♦♦ When keep-alives are used, most browsers usually open up multiple TCP sessions. In the past 2 were opened max to not overload the server. Nowadays browsers open up more sessions at the same time to make sure objects are fetched in parallel. I just checked my firefox setting (open about:config) and the setting "network.http.max-connections-per-server" is set to 15 by default now. (21 Apr '11, 00:15) SYN-bit ♦♦ |
A rough indication on how many objects were on a page is to use the "http.rerefer" field. When a browser requests an object that is part of a page, it sets the Referer: header to the URL of the page on which the object was requested. So I just tried opening www.facebook.com and filtered for Please note that your original request will not be in the list (as the Referer: field will be empty when you manually type in an URL). Also be aware that any click on the page will also use the page URL in the Referer: field, even when going to another website. answered 20 Apr '11, 23:59 SYN-bit ♦♦ edited 21 Apr '11, 00:01 Are you sure about it?if I have a webpage with one picture which is stored in my own server I think that the request for the picture wont have referrer but it is an object. (21 Apr '11, 10:32) A B If the image is referenced by an from within a html page, requesting the html page will make the browser request the image xxx and when it does, it should have a "Referer:" header. You could check this within firefox with http-fox (or Firebug) for instance. There is one way to find out for sure and that's to request the page, make a trace with wireshark and look in the http-headers of each request. (21 Apr '11, 13:56) SYN-bit ♦♦ |
So how can I count number of objects?just trace the source code of web page?