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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2020-09-07
    • None
    • None
    • None

      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).

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

              Created:
              Updated:
              Resolved:

                Version Package
                2020-09-07