WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
194161
Web Inspector: Network: Ajax requests to self show initial page load preview
https://bugs.webkit.org/show_bug.cgi?id=194161
Summary
Web Inspector: Network: Ajax requests to self show initial page load preview
ajpullen
Reported
2019-02-01 09:08:21 PST
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>
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug