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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 2020-09-07
    • Affects Version/s: None
    • Component/s: 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).

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

              Created:
              Updated:
              Resolved:

                Version Package
                2020-09-07