Use library version as query strings for external css (like js does)

Created on 21 May 2019, about 6 years ago
Updated 18 August 2023, almost 2 years ago

Non-aggregated CSS external files do NOT use the library version as a query string like JS library files do. I'm not sure why this is other than it seems like an oversight. Perhaps someone can give good reasoning as to why this was left out of core.

See attached patch for 8.7.1.

๐Ÿ› Bug report
Status

Postponed: needs info

Version

9.5

Component
Asset libraryย  โ†’

Last updated 3 days ago

No maintainer
Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States erscott

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    Non aggregated CSS assets use a value from state which is derived from a timestamp and updated on cache clear. There is no need to append a version parameter as far as I can see? Honestly I'm not sure if JS files need it either? Marking PMNMI in case anyone disagrees

  • Status changed to Active almost 2 years ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    I think this is valid, but it's a task rather than a bug.

    Using the version instead of the hashed timestamp means that if the CSS version doesn't change, it can persist in CDN/varnish/browser caches even when the Drupal cache is cleared which should result in better hit rates.

    If we have tests for the js version in the query string, we should be able to adapt those for CSS straightforwardly so adding the 'needs tests' tag.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sanket.tale

    sanket.tale โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 100s
    #478881
  • Pipeline finished with Failed
    about 1 month ago
    Total: 125s
    #478888
  • Pipeline finished with Failed
    about 1 month ago
    Total: 423s
    #478890
  • Pipeline finished with Failed
    about 1 month ago
    Total: 529s
    #478905
  • Pipeline finished with Failed
    about 1 month ago
    Total: 462s
    #478913
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sanket.tale

    Created MR but it is failed due to the Nightwatch pipeline on `ckEditor5EditorHeightTest.js`, which is unrelated. pipeline passed for the relevant areas.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Issue summary appears incomplete.

    Was previously tagged for tests which still appear to be needed.

Production build 0.71.5 2024