Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-30

Issues with JavaScript and CSS Caching

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: no change required
    • Affects Version/s: 5.1.0
    • Fix Version/s: 5.1.0
    • Component/s: Admin Interfaces
    • Labels:
      None

      Description

      When script.js or any other script or css file is changed, then it's name stays the same and browser doesn't query it's new contents from server again. This could be a problem, especially, because user's need to clear browser cache before doing anything.

      I propose to add new configuration variable named "ScriptVersion". It could be number or timestamp, doesn't really matter. We don't show it to user in admin (can change in db directly) and add to any script/css include in admin templates, like:

      <script src="js/script.js?<inp2:m_GetConfig name="ScriptVersion"/>" .../>
      <script src="inc/style.js?<inp2:m_GetConfig name="ScriptVersion"/>" .../>

      When we change something in js/css then we change this variable value in db (and in upgrade script). This way when js/css is changed, then url also will be changed and browser will be forced to reread content from webserver.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dmitry Dmitry Andrejev [Intechnic]
                Reporter:
                alex Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: