XMLWordPrintable

Details

    • Sub-task
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The version is read as a const from version file
      if translate5 is updated, while user has active session, for each REST-call an exception is thrown which tells the user to refresh the frontend (and does automatically do so, if the user clicks yes) and it is ensured, that all JS- and CSS-sources are really refreshed by using of versioning-id-parameter.

      Simplest way:

      Different data (static files JS and CSS, dynamic JSON data) is differently invoked:

      • CSS and some JS by index.phtml
      • Image files
      • Most JS by Ext.Loader
      • JSON by Ajax calls through the application.
        We can put the version in the request either as GET / POST Parameter or in the URL as path part removed with RewriteRules. Not every combination of techniques is working:
        URL /v-1.2.3/foo Parameter: foo.bar?v=1.2.3
      CSS / JS by index.phtml + easy to set + easy to set
      Image Files + automatically through CSS path if included relativly +/- manually on each inclusion, changment only needed after image change, so v=2 is OK instead v=1.2.3
      Ext.Loader + easy on loader definition -not possible
      Ajax JSON + easy to set through restpath
      -Zend Routing must be modified, since /v-1.2.3/ is recognized as module / controller.
      + easy to set through Ajax base params
      + recognized directly as parameter in Zend

      Alternative way would be to insert the version into the file name (like amazon), the pros and cons are the same as for parameter versioning, expect for Ajax JSON: here it is not possible out of the box.
      So we currently prefer the following:
      URL Versioning for the first three needs, Parameter Versioning for the Ajax JSON files. Since Ajax JSON calls are dynamically answered by the server, they are able to send the user a hint if version changed, so having the version as parameter is a pro. For the static files this is hardly possible and also not needed, since statics files are all loaded on application start.
      If we recognize an old version call on PHP side we should through a 400 Bad Request.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              marcmittag Marc Mittag [Administrator]
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: