Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1776

Caching should be disabled for /system/sling/info.sessionInfo(.json)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Servlets Get 2.1.0
    • Servlets
    • None
    • InternetExplorer

    Description

      IE seems to cache the /system/sling/info.sessionInfo.json page/result.
      If you perform an authentication in the browser and then gather the current session info through Sling.getSessionInfo the outdated info is returned instead.

      Solution:
      the following http header should be attached to the given url/resource:
      Cache-Control : private, no-store, no-cache, max-age=0, must-revalidate

      Additionally the Sling#getSessionInfor method in sling.js could make the URI unique by adding a time tag and hence preventing any browser from caching the result.
      ...
      var res=Sling.httpGet(Sling.baseurl+"/system/sling/info.sessionInfo."new Date().getTime()".json");

      ...

      Attachments

        Activity

          People

            justinedelson Justin Edelson
            clemensdev Clemens Wyss
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: