Network tab in DevTools counts asset size twice when status 302 is returned
Categories
(DevTools :: Netmonitor, defect)
Tracking
(Not tracked)
People
(Reporter: bruno.giorello, Unassigned)
Details
Attachments
(1 file)
41.09 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
- Open the DevTools and go to Network
- Visit https://test.bgior.com/goose, which returns a 302 to https://test.bgior.com/goose.jpg
Actual results:
When calculating the total request size (and total transferred size), Firefox counts the size of the asset twice: once for the 302 response, and once for the 200 one.
Expected results:
Since the asset is only transferred once, it should only count once towards the total request size.
I noticed this because the total request size reported by Google Chrome for one website was significantly lower than that reported by Firefox. The discrepancy was explained by the fact that many of the images were loaded with 302 redirects.
A screenshot is attached contrasting how both browsers calculate the total sizes for the aforementioned example URL.
Hi,
I was unable to reproduce the issue, I tried on Firefox Nightly 79.0a1 (2020-06-22) (64-bit) and Release 77.0.1 (64-bit) versions.
You can also try testing if the issue is reproducible in safe mode, here is a link that can help you:
https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
Or you can also download Firefox Nightly from here: https://nightly.mozilla.org/ , to see if the issue still occurs there as well.
Thanks in advance. I've already chosen a component for this bug in hope that someone with more expertise may look at it. We'll await their answer.
Regards,
Jerónimo.
I have checked on the following versions and the issue appears to be present in all of them:
- Firefox 77.0.1 (Ubuntu 20.04)
- Firefox 77.0.1 (Ubuntu 20.04) with safe mode
- Firefox 77.0.1 (Windows 10)
- Firefox Nightly 79.0a1 2020-06-22 (Ubuntu 20.04)
If you are testing on the sample URL I provided, please ensure you're loading the pre-redirection URL (i.e. https://test.bgior.com/goose) and not the post-redirection one (https://test.bgior.com/goose.jpg). Hitting refresh after the image is loaded will load the latter URL and therefore won't reproduce the issue neither.
If successfully reproduced, you should find that the total size displayed is ~57KB, which is twice the size of the image.
Comment 3•4 years ago
|
||
Hi Bruno,
Thanks for reporting.
Your test url seems to be returning a 403. Please would you be able to provide a working example url.
Thanks alot.
Sorry about that, you should be able to access the example URL now.
Comment 5•4 years ago
|
||
Hi, guys. Seems this is duplicate of this issue https://bugzilla.mozilla.org/show_bug.cgi?id=1617852
Looks right, different status code but the same underlying issue. Please feel free to mark this as duplicate.
Comment 7•4 years ago
|
||
Thanks @stanislav and @bruno,
Marking as a duplicate of Bug 1617852 as has more details
Description
•