Bug 194161
| Summary: | Web Inspector: Network: Ajax requests to self show initial page load preview | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | ajpullen |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Trivial | CC: | ajpullen, inspector-bugzilla-changes |
| Priority: | P2 | ||
| Version: | Safari 12 | ||
| Hardware: | All | ||
| OS: | All | ||
ajpullen
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. |