Does it support caching?

Created on 10 July 2024, 9 months ago

Hello,

Does it support caching, if the page is refreshed, will it use the cached data? Thanks

💬 Support request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

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

Comments & Activities

  • Issue created by @msn5158
  • 🇮🇩Indonesia gausarts

    Thank you

    Short anwer: yes.

    Long answers:
    By default, core ajax, views ajax, and thus this module uses the default value of cache option:
    https://git.drupalcode.org/project/drupal/-/blob/10.3.1/core/misc/ajax.j...
    https://git.drupalcode.org/project/drupal/-/blob/10.3.1/core/modules/vie...

    More details here:
    https://api.jquery.com/jquery.ajax/
    > cache (default: true, false for dataType 'script' and 'jsonp')
    Type: Boolean
    If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET.

    Also browsers always enable cache, unless you press F12 and disable it manually.

    Should you need to disable cache, e.g.: fetching data which require fresh data in seconds you can override this module JS files as required, instead, or globally via $.ajaxSetup() parmateters, only if you had to.

Production build 0.71.5 2024