SHS causes "Leverage browser caching" issue

Created on 21 March 2018, almost 7 years ago
Updated 19 May 2024, 7 months ago

Checking both Google Pagespeed Insights and GTMetrix, I can see my SHS-enabled taxonomy term is reported:

https://www.kobejet.com/shs-term-data/shs-field-lesson-topics/lesson_cat... (1 day)

The link takes me to these details:

[{"tid":"847","name":"ES","description__value":null,"langcode":"en","hasChildren":true},{"tid":"628","name":"GENERAL","description__value":null,"langcode":"en","hasChildren":true},{"tid":"846","name":"High School","description__value":null,"langcode":"en","hasChildren":false},{"tid":"629","name":"HOLIDAYS","description__value":null,"langcode":"en","hasChildren":true},{"tid":"630","name":"NEW CROWN 1","description__value":null,"langcode":"en","hasChildren":true},{"tid":"682","name":"NEW CROWN 2","description__value":null,"langcode":"en","hasChildren":true},{"tid":"691","name":"NEW CROWN 3","description__value":null,"langcode":"en","hasChildren":true}]

Hope this is enough to track the issue down - it's all above my head!

πŸ’¬ Support request
Status

Postponed: needs info

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States w01f

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Hi,

    I am on SHS 2.0.0-rc12. I am coming on this issue from πŸ› Add check access of terms in json data Needs review because I initially thought there was an access control missing. But it was a browser cache problem.

    So not sure if it is the same issue.

    My scenario:

    I need to expose a form (to anonymous and authenticated users) where they will have to choose in a hierarchical taxonomy vocabulary.
    When a taxonomy term is unpublished, if it had already been requested (as root term or as child term), it will still appear on a anonymous browser.

    I need to force a browser cache clear on the anonymous browser to see the change.

    In my settings.php I also have:

      $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
      $settings['cache']['bins']['page'] = 'cache.backend.null';
      $settings['cache']['bins']['render'] = 'cache.backend.null';
    

    So page cache is disabled.

    I guess for authenticated users it will be ok but not for anonymous.

Production build 0.71.5 2024