This is our old Q&A Site. Please post any new questions and answers at

What is relation between number of HTTP packets and number of objects in a web page?

asked 20 Apr '11, 13:42

A%20B's gravatar image

accept rate: 0%

So how can I count number of objects?just trace the source code of web page?

(20 Apr '11, 13:49) A B


permanent link

answered 20 Apr '11, 13:47

Jaap's gravatar image

Jaap ♦
accept rate: 14%

You might try to filter on GET/POST requests, for example using

http.request.method==GET or http.request.method==POST

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.

permanent link

answered 20 Apr '11, 16:34

Jasper's gravatar image

Jasper ♦♦
accept rate: 18%

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 and filtered for http.referer == "" and that gave me 44 objects (you can quickly count the amount of objects by looking at the status bar where it says (Packets: XXX, Displayed 44, Marked XX, Dropped XX).

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.

permanent link

answered 20 Apr '11, 23:59

SYN-bit's gravatar image

SYN-bit ♦♦
accept rate: 20%

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 ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Apr '11, 13:42

question was seen: 15,303 times

last updated: 21 Apr '11, 13:56

p​o​w​e​r​e​d by O​S​Q​A