tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

index.rst (17998B)


      1 =======================
      2 Network request details
      3 =======================
      4 
      5 The request details pane appears when you click on a network request in the request list. This pane provides more detailed information about the request.
      6 
      7 Network request details
      8 ***********************
      9 
     10 Clicking on a row displays a new pane in the right-hand side of the network monitor, which provides more detailed information about the request.
     11 
     12 .. image:: network-details-fx78.png
     13  :alt: Screenshot of the Network Request details pane, without callouts for the close-pane button and the detail tabs
     14  :class: center
     15 
     16 
     17 The tabs at the top of this pane enable you to switch between the following pages:
     18 
     19 - :ref:`Headers <network-monitor-request-details-headers-tab>`
     20 - **Messages** (only for WebSocket items)
     21 - :ref:`Request <network-monitor-request-details-request-tab>`
     22 - :ref:`Response <network-monitor-request-details-response-tab>`
     23 - :ref:`Cache <network-monitor-request-details-cache-tab>`
     24 - :ref:`Timings <network-monitor-request-details-timings-tab>`
     25 - :ref:`Security <network-monitor-request-details-security-tab>`
     26 - :ref:`Stack trace <network-monitor-request-details-stack-trace-tab>` (only when the request has a stack trace, e.g. a script called by another script).
     27 
     28 
     29 Clicking the icon at the right-hand end of the :doc:`toolbar <../toolbar/index>` closes the details pane and returns you to the list view.
     30 
     31 
     32 .. _network-monitor-request-details-headers-tab:
     33 
     34 Headers tab
     35 -----------
     36 
     37 The Headers tab has a toolbar, followed by three main sections.
     38 
     39 This includes:
     40 
     41 
     42 - Information about the request
     43 
     44  - Status: The response status code for the request; click the "?" icon to go to the reference page for the status code.
     45  - Version: The version of HTTP used.
     46  - Transferred: The amount of data transferred for the request.
     47  - Referrer policy: The value of the `Referrer-policy header <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy>`_.
     48 
     49 - **HTTP Early hints response headers** (when the request includes early hints)
     50 - **HTTP Response headers**
     51 - **HTTP Request headers**
     52 
     53 Each section has a disclosure triangle to expand the section to show more information.
     54 
     55 
     56 Headers toolbar
     57 ~~~~~~~~~~~~~~~
     58 
     59 Using the Headers toolbar, you can:
     60 
     61 
     62 - Filter the headers in the Response Headers and Request Headers sections.
     63 - **Block** the domain involved in this request. The domain is added to the :ref:`Blocking sidebar <network_monitor_blocking_specific_urls>`.
     64 - Resend the request. The **Resend** button opens a menu with two items:
     65 
     66  - **Resend**: Resends the request.
     67  - **Edit and Resend**: Enables an editing mode, where you can modify the method, URL, request headers, or request body of the request. Click **Send** to send the modified request, or **Cancel** to cancel editing.
     68 
     69 
     70 Request Information
     71 ~~~~~~~~~~~~~~~~~~~
     72 
     73 The following information is shown only when the section is expanded:
     74 
     75 - **Scheme**: The scheme used in the URL
     76 - **Host**: The server involved in the request
     77 - **Filename**: The full path to the file requested
     78 - **Address**: The IP address of the host
     79 
     80 The following information is shown in both the collapsed and the expanded states:
     81 
     82 
     83 - **Status:** The `HTTP response code <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status>`_ for the request.
     84 - **Version**: The HTTP version used
     85 - **Transferred**: The amount of data transferred with the request
     86 - The **Referrer Policy**, which governs which referrer information, sent in the `Referer <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referer>`_ header, should be included with requests. (See `Referrer-Policy <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy>`_ for a description of possible values)
     87 - **Blocking**: If the request is to a site that is associated with a known tracker, an icon and a message are shown; otherwise, this field is not shown.
     88 
     89 Early hints response headers
     90 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     91 
     92 The `Early hints <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103>`_ response headers section shows the headers provided by HTTP 103 informational response. For each line in the early hints response headers section, a question mark links to the documentation for that response header, if one is available.
     93 
     94 A **Raw** toggle button in the section heading controls whether the headers are shown with formatting, or as plain, unformatted text.
     95 
     96 .. image:: early-hint-response-headers.png
     97  :alt: Screenshot showing the Early hints response headers section of the Header details pane
     98  :class: border
     99 
    100 Response headers
    101 ~~~~~~~~~~~~~~~~
    102 
    103 The response headers section shows details about the response. For each line in the response headers section, a question mark links to the documentation for that response header, if one is available.
    104 
    105 A **Raw** toggle button in the section heading controls whether the headers are shown with formatting, or as plain, unformatted text.
    106 
    107 .. note::
    108  Note that the keys in the response header are all in lowercase, while the request headers keys are not. `HTTP/2 requires that all headers be lowercase <https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2>`_; response headers are shown as they are received from the server. (There may be some exceptions, such as ``X-Firefox-Spdy``, which is added by Firefox.)
    109 
    110 
    111 .. image:: response-headers-fx78.png
    112  :alt: Screenshot showing the Response headers section of the Headers details pane
    113  :class: border
    114 
    115 You can copy some or all of the response header in JSON format by using the context menu:
    116 
    117 .. image:: copy-response-headers-fx78.png
    118  :alt: Screenshot showing the Response headers pane, and its context menu with "Copy" and "Copy all" items
    119  :class: border
    120 
    121 If you select **Copy**, a single key word, value pair is copied. If you select **Copy All**, the entire header is copied in JSON format, giving you something like this (after running the results through a JSON validator):
    122 
    123 
    124 .. code-block:: json
    125 
    126  {
    127    "Response headers (1.113 KB)": {
    128      "headers": [
    129        {
    130          "name": "accept-ranges",
    131          "value": "bytes"
    132        },
    133        {
    134          "name": "age",
    135          "value": "0"
    136        },
    137        {
    138          "name": "backend-timing",
    139          "value": "D=74716 t=1560258099074460"
    140        },
    141        {
    142          "name": "cache-control",
    143          "value": "private, must-revalidate, max-age=0"
    144        },
    145        {
    146          "name": "content-disposition",
    147          "value": "inline; filename=api-result.js"
    148        },
    149        {
    150          "name": "content-encoding",
    151          "value": "gzip"
    152        },
    153        {
    154          "name": "content-length",
    155          "value": "673"
    156        },
    157        {
    158          "name": "content-type",
    159          "value": "text/javascript; charset=utf-8"
    160        },
    161        {
    162          "name": "date",
    163          "value": "Tue, 11 Jun 2019 13:01:39 GMT"
    164        },
    165        {
    166          "name": "mediawiki-login-suppressed",
    167          "value": "true"
    168        },
    169        {
    170          "name": "p3p",
    171          "value": "CP=\"This is not a P3P policy! See https://en.wikipedia.org/wiki/Special:CentralAutoLogin/P3P for more info.\""
    172        },
    173        {
    174          "name": "server",
    175          "value": "mw1316.eqiad.wmnet"
    176        },
    177        {
    178          "name": "server-timing",
    179          "value": "cache;desc=\"pass\""
    180        },
    181        {
    182          "name": "strict-transport-security",
    183          "value": "max-age=106384710; includeSubDomains; preload"
    184        },
    185        {
    186          "name": "vary",
    187          "value": "Accept-Encoding,Treat-as-Untrusted,X-Forwarded-Proto,Cookie,Authorization,X-Seven"
    188        },
    189        {
    190          "name": "via",
    191          "value": "1.1 varnish (Varnish/5.1), 1.1 varnish (Varnish/5.1)"
    192        },
    193        {
    194          "name": "x-analytics",
    195          "value": "ns=-1;special=Badtitle;WMF-Last-Access=11-Jun-2019;WMF-Last-Access-Global=11-Jun-2019;https=1"
    196        },
    197        {
    198          "name": "x-cache",
    199          "value": "cp1075 pass, cp1075 pass"
    200        },
    201        {
    202          "name": "x-cache-status",
    203          "value": "pass"
    204        },
    205        {
    206          "name": "x-client-ip",
    207          "value": "204.210.158.136"
    208        },
    209        {
    210          "name": "x-content-type-options",
    211          "value": "nosniff"
    212        },
    213        {
    214          "name": "X-Firefox-Spdy",
    215          "value": "h2"
    216        },
    217        {
    218          "name": "x-frame-options",
    219          "value": "SAMEORIGIN"
    220        },
    221        {
    222          "name": "x-powered-by",
    223          "value": "HHVM/3.18.6-dev"
    224        },
    225        {
    226          "name": "x-search-id",
    227          "value": "esvan0r5bnnwscyk2wq09i1im"
    228        },
    229        {
    230          "name": "x-varnish",
    231          "value": "766019457, 417549316"
    232        }
    233      ]
    234    },
    235    "Request headers (665 B)": {
    236      "headers": [
    237        {
    238          "name": "Accept",
    239          "value": "*/*"
    240        },
    241        {
    242          "name": "Accept-Encoding",
    243          "value": "gzip, deflate, br"
    244        },
    245        {
    246          "name": "Accept-Language",
    247          "value": "en-US,en;q=0.5"
    248        },
    249        {
    250          "name": "Connection",
    251          "value": "keep-alive"
    252        },
    253        {
    254          "name": "Cookie",
    255          "value": "WMF-Last-Access=11-Jun-2019; WMF-Last-Access-Global=11-Jun-2019; mwPhp7Seed=5c9; GeoIP=US:NY:Port_Jervis:41.38:-74.67:v4"
    256        },
    257        {
    258          "name": "DNT",
    259          "value": "1"
    260        },
    261        {
    262          "name": "Host",
    263          "value": "en.wikipedia.org"
    264        },
    265        {
    266          "name": "Referer",
    267          "value": "https://www.wikipedia.org/"
    268        },
    269        {
    270          "name": "TE",
    271          "value": "Trailers"
    272        },
    273        {
    274          "name": "User-Agent",
    275          "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0"
    276        }
    277      ]
    278    }
    279  }
    280 
    281 Request headers
    282 ~~~~~~~~~~~~~~~
    283 
    284 The Request headers section shows details about the request headers. For each line in the request headers section, a question mark links to the documentation for that request header, if one is available.
    285 
    286 A **Raw** toggle button in the section heading controls whether the headers are shown with formatting, or as plain, unformatted text.
    287 
    288 .. image:: request-headers-fx78.png
    289  :alt: Screenshot showing the Request headers section of the Request details pane
    290  :class: border
    291 
    292 
    293 .. _network-monitor-request-details-cookies-tab:
    294 
    295 Cookies tab
    296 -----------
    297 
    298 This tab lists full details of any cookies sent with the request or response:
    299 
    300 .. image:: network_cookies.png
    301  :class: border
    302 
    303 As with headers, you can filter the list of cookies displayed. The full list of cookie attributes is shown—see the following screenshot showing Response cookies with further attributes shown.
    304 
    305 .. image:: highlight-samesite-attribute.png
    306  :alt: cookies panel in firefox devtools network monitor, showing a number of cookie attributes including samesite
    307 
    308 
    309 .. _network-monitor-request-details-request-tab:
    310 
    311 Request tab
    312 -----------
    313 
    314 Request shows the complete request parameters, by default, in a formatted view:
    315 
    316 .. image:: json_formatted_request.png
    317  :class: border
    318 
    319 
    320 Switch the toggle button to have the raw view presented:
    321 
    322 .. image:: json_raw_request.png
    323  :class: border
    324 
    325 
    326 .. _network-monitor-request-details-response-tab:
    327 
    328 Response tab
    329 ------------
    330 
    331 The complete content of the response. If the response is HTML, JS, or CSS, it will be shown as text:
    332 
    333 .. image:: html_formatted_response.png
    334  :class: border
    335 
    336 
    337 The toggle button for switching between raw and formatted response view has been implemented (`bug 1693147 <https://bugzilla.mozilla.org/show_bug.cgi?id=1693147>`_). The previous HTML example makes use of the formatted view. When the toggle button is turned on, the raw response view will be enabled:
    338 
    339 .. image:: html_raw_response.png
    340  :class: border
    341 
    342 
    343 If the response is JSON, it will be shown as an inspectable object:
    344 
    345 .. image:: json_formatted_response.png
    346  :class: border
    347 
    348 
    349 In the raw response view the response will be shown as a string:
    350 
    351 .. image:: json_raw_response.png
    352  :class: border
    353 
    354 
    355 If the response is an image, the tab displays a preview:
    356 
    357 .. image:: response_pane_image.png
    358  :class: border
    359 
    360 
    361 If the response is a web font, the tab also displays a preview:
    362 
    363 .. image:: response_font.png
    364  :class: border
    365 
    366 
    367 For network responses that are initiated by a `WebSocket <https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API>`_ connection, the details pane shows any associated messages. For more information, see :doc:`Inspecting web sockets <../inspecting_web_sockets/index>`.
    368 
    369 
    370 .. _network-monitor-request-details-cache-tab:
    371 
    372 Cache tab
    373 ---------
    374 
    375 If the response is cached (i.e. a 304), the Cache tab displays details about that cached resource.
    376 
    377 .. image:: response_cache.png
    378  :class: border
    379 
    380 These details include:
    381 
    382 - **Last fetched:** The date the resource was last fetched
    383 - **Fetched count:** The number of times in the current session that the resource has been fetched
    384 - **Data size:** The size of the resource.
    385 - **Last modified:** The date the resource was last modified.
    386 - **Expires:** The date the resource expires.
    387 - **Device:** The device the resource was fetched from (e.g. "disk").
    388 
    389 
    390 HTML preview
    391 ~~~~~~~~~~~~
    392 
    393 If the response is HTML, a preview of the rendered HTML appears inside the Response tab, above the response payload.
    394 
    395 
    396 .. _network-monitor-request-details-timings-tab:
    397 
    398 Timings tab
    399 -----------
    400 
    401 The Timings tab provides information about how long each stage of a network request took, with a more detailed, annotated, view of the timeline bar, so it is easy to locate performance bottlenecks.
    402 
    403 .. image:: network-timings-tab.png
    404  :class: border
    405 
    406 
    407 This tab can include the following sections.
    408 
    409 
    410 Queued, Started, Downloaded
    411 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    412 
    413 The following timings are displayed at the top of the Timings tab:
    414 
    415 - Queued: When the resource was queued for download.
    416 - Started: When the resource started downloading.
    417 - Downloaded: When the resource finished downloading.
    418 
    419 
    420 .. note::
    421  Future versions will also show this information when entries in the network monitor timeline graph are moused over (see `bug 1580493 <https://bugzilla.mozilla.org/show_bug.cgi?id=1580493>`_).
    422 
    423 
    424 Request Timing
    425 ~~~~~~~~~~~~~~
    426 
    427 The *Request Timing* section breaks a network request down into the following subset of the stages defined in the `HTTP Archive <https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HAR/Overview.html>`_ specification:
    428 
    429 
    430 .. list-table::
    431  :widths: 20 80
    432  :header-rows: 0
    433 
    434  * - Name
    435    - Description
    436 
    437  * - Blocked
    438    - Time spent in a queue waiting for a network connection.
    439 
    440      The browser imposes a limit on the number of simultaneous connections that can be made to a single server. In Firefox this defaults to 6, but can be changed using the `network.http.max-persistent-connections-per-server <http://kb.mozillazine.org/Network.http.max-persistent-connections-per-server>`_ preference. If all connections are in use, the browser can't download more resources until a connection is released.
    441 
    442  * - DNS resolution
    443    - Time taken to resolve a host name.
    444 
    445  * - Connecting
    446    - Time taken to create a TCP connection.
    447 
    448  * - Sending
    449    - Time taken to send the HTTP request to the server.
    450 
    451  * - Waiting
    452    - Waiting for a response from the server.
    453 
    454  * - Receiving
    455    - Time taken to read the entire response from the server (or cache).
    456 
    457 
    458 Server Timing
    459 ~~~~~~~~~~~~~
    460 
    461 The *Server Timing* section lists any information provided in the `Server-Timing <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Server-Timing>`_ header — this is used to surface any backend server timing metrics you've recorded (e.g. database read/write, CPU time, file system access, etc.).
    462 
    463 The header takes a series of descriptions and durations, which can be anything you like. In the above screenshot for example, the highlighted request's ``Server-Timing`` header contains 4 items — *data*, *markup*, *total*, and *miss*.
    464 
    465 Service Worker Timing
    466 ~~~~~~~~~~~~~~~~~~~~~
    467 
    468 The *Service Worker Timing* section lists the information relating to the specific service worker request. The metrics include Startup, Dispatch fetch and Handle fetch.
    469 
    470 .. image:: network-service-worker-timings.png
    471  :class: border
    472 
    473 .. list-table::
    474  :widths: 20 80
    475  :header-rows: 0
    476 
    477 
    478  * - Name
    479    - Description
    480 
    481  * - Startup
    482    - Time taken to launch the service worker, this is only indicated if the launch starts after the fetch event has already been dispatched.
    483 
    484  * - Dispatch fetch
    485    - Time taken from when a fetch event is triggered to just before it starts getting handled by the service worker.
    486 
    487  * - Handle fetch
    488    - Time taken to by the service worker to handle the fetch event.
    489 
    490 
    491 .. _network-monitor-request-details-security-tab:
    492 
    493 Security tab
    494 ------------
    495 
    496 If the site is being served over HTTPS, you get an extra tab labeled "Security". This contains details about the secure connection used including the protocol, the cipher suite, and certificate details:
    497 
    498 .. image:: network_security.png
    499  :alt: border
    500 
    501 The Security tab shows a warning for security weaknesses. Currently it warns you about two weaknesses:
    502 
    503 1. Using SSLv3 instead of TLS
    504 2. Using the RC4 cipher
    505 
    506 .. image:: security-warning.png
    507  :class: center
    508 
    509 
    510 .. _network-monitor-request-details-stack-trace-tab:
    511 
    512 Stack trace tab
    513 ---------------
    514 
    515 Stack traces are shown in the *Stack Trace* tab, for responses that have a stack trace of course.
    516 
    517 .. image:: network_stack_trace.png
    518  :class: border
    519 
    520 
    521 Network Monitor Features
    522 ************************
    523 
    524 The following articles cover different aspects of using the network monitor:
    525 
    526 - :doc:`Toolbar <../toolbar/index>`
    527 - :doc:`Network request list <../request_list/index>`
    528 - :doc:`Network request details <../request_details/index>`
    529 - :doc:`Network traffic recording <../performance_analysis/index>`
    530 - :doc:`Throttling <../throttling/index>`
    531 - :doc:`Inspecting web sockets <../inspecting_web_sockets/index>`