Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-6730

Load post page CSS only on post pages

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Merged
    • Icon: Should have Should have
    • 2.78.0
    • None
    • 5
    • Code Refactoring, Performance
    • Sprint #182
    • tavros

      We can avoid sending the post page CSS on every page type if we create a separate entrypoint for this CSS, and conditionally enqueue it.

      This reduces the main CSS file (uncompressed) from about 87KB to 70KB. The post CSS file is just 10KB, so even that page has 7KB less blocking CSS. This can be further reduced, it's still possible to reduce the specificity of some of the post CSS.

            pvincent Pieter Vincent (Inactive)
            pvincent Pieter Vincent (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: