Closed Bug 1592624 Opened 5 years ago Closed 5 years ago

Network monitor: content-type "ld+json" is displayed as "ld"

Categories

(DevTools :: Netmonitor, defect)

70 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: soerenklein98, Unassigned)

Details

(Keywords: dev-doc-needed)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

Downloaded a ld+json-file via JS.
Example:

  • visit https://demo.api-platform.com/
  • open network monitor
  • click on "GET:/books", "try it out" and "execute"
  • network monitor will now display a new file with the content-type "ld" and the whole content-type inside the headers-panel

Actual results:

"ld" was displayed within the network monitor overview

Expected results:

"ld-json" or just "json" should have been displayed within the network monitor overview

sry, first screenshot was from the wrong tab

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Netmonitor
Product: Firefox → DevTools

The priority flag is not set for this bug.
:Honza, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(odvarko)

I don't think this is a bug, the Typ (en-US Type) columns shows file extension or shortened version of the content-type.
While the Headers panel shows the full value of the content type header, which in this case is application/ld+json; charset=utf-8

Does it make sense?
Should we close the report?

Honza

Flags: needinfo?(odvarko) → needinfo?(soerenklein98)

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #4)

I don't think this is a bug, the Typ (en-US Type) columns shows file extension or shortened version of the content-type.
While the Headers panel shows the full value of the content type header, which in this case is application/ld+json; charset=utf-8

Does it make sense?
Should we close the report?

Honza

Hi,

thanks for the explanation, it makes more sense now. But it was quite confusing to read ld instead of json or ld+json.
Funny thing is, I just tried to hover over these shortened types and Firefox actually displays the full content-type-header if shortened.

Flags: needinfo?(soerenklein98)

(In reply to soerenklein98 from comment #5)

But it was quite confusing to read ld instead of json or ld+json.

I see. Any tips about what we could do to make this less confusing?
Note that displaying the full content-type in the column could take a lot of (expensive) horizontal space...

Honza

Flags: needinfo?(soerenklein98)

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #6)

Note that displaying the full content-type in the column could take a lot of (expensive) horizontal space...

Yeah, displaying the whole content-type would take to much space. I think the easiest way would be to add another sentence to "Type" on the Network_Monitor/request_list-documentation. Something like "Type: Content-type of the response. It might be shortened to save space. The whole content-type-header will be visible as a tooltip on hover."

Another way could be to make the content-type-shortening editable. Either in form of a table (maybe saved as a csv inside the profile) or as a regex which can be modified through about:config.

But I'm actually very glad that I can read the content-type from the tooltip. Only the conversion from application/ld+json to just ld was unexpected.

Flags: needinfo?(soerenklein98)

(In reply to soerenklein98 from comment #7)

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #6)
I think the easiest way would be to add another sentence to "Type" on the Network_Monitor/request_list-documentation. Something like "Type: Content-type of the response. It might be shortened to save space. The whole content-type-header will be visible as a tooltip on hover."

Thanks for the feedback!
Agree, MDN should be updated.

This is the related MDN page:
https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_list#Network_request_columns

Honza

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Keywords: dev-doc-needed
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: