Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-11076

Size of data-context attributes used for React hydration bloats page size

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2020-09-07
    • Component/s: None
    • Labels:
      None

      Description

      For example, if you view the page source for the Beatles' artist page, a "data-context" attribute appears in the source five times. This Catalyst context data is constant, though - we should only be embedding it in the page once.

      Additionally, putting it inside an attribute means all quotes (") in the JSON have to be converted into ", which further unreasonably inflates the byte count of the page. There's no reason the context data can't be placed in a normal script tag instead (where we only have to escape closing tag symbols).

        Attachments

          Activity

            People

            • Assignee:
              bitmap Michael Wiencek
              Reporter:
              bitmap Michael Wiencek
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                2020-09-07