[Webkit-unassigned] [Bug 194161] New: Web Inspector: Network: Ajax requests to self show initial page load preview

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 1 09:08:21 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=194161

            Bug ID: 194161
           Summary: Web Inspector: Network: Ajax requests to self show
                    initial page load preview
           Product: WebKit
           Version: Safari 12
          Hardware: All
                OS: All
            Status: NEW
          Severity: Trivial
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ajpullen at me.com
                CC: inspector-bugzilla-changes at group.apple.com

With inspector open (in order to capture network requests) on page load and then trigger a POST request on the *same* page that causes a different response, only the initial response is displayed.
It *should* display multiple requests per event (the initial request and any subsequent requests). The way around this is to Clear Network Items with the page loaded, and then trigger the subsequent requests, and then all subsequent requests are displayed as expected.

Steps to reproduce:
- Open a page that sends and Ajax request to itself, causing a different response than the initial page load. **MUST HAVE WEB INSPECTOR OPEN** (or reload the page to capture the initial load in the Network tab)
- Trigger the Ajax Event (POST/GET)
- The subsequent request does not get added to the Network list

========

Example script:
<?php

  if (!empty($_POST['request'])) {
    echo 'Response!';    
    exit;
  }

?>

<html>
  <head>
  </head>
  <body>
    <button id="button">Click</button>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script>
      $( "#button" ).on( "click", function(e) {

      $.ajax({
        type: "POST",
        url: window.location.href,
        data: {'request': true},
          success: function(data)
            {
              alert(data); // show response from the php script.
            }
        });
      });
    </script>
  </body>
</html>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190201/ee6af102/attachment.html>


More information about the webkit-unassigned mailing list