Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4979

Allow caching of theme.css files for admin and client area

    Details

      Description

      Under Settings > Company > Look and Feel you can set a color theme, and change colors, etc. The theme is loaded in structure for both the admin and client areas. For example:

      <link href="/admin/theme/theme.css?dir=" rel="stylesheet" type="text/css" media="screen" />
      <link href="/client/theme/theme.css?dir=" rel="stylesheet" type="text/css" media="screen" />

      Every page load Blesta does a query and fetches the theme data and builds the CSS file and sends it to the browser. However, this not an insignificant amount of overhead. Rather, the CSS files should be able to be cached by the browser. They may be sending a no-cache header. Ideally, we should set a version or hash in the URL after theme.css like theme.css?ver=12345678 and allow the browser to cache. Then, if the theme is changed in any way (select new theme or change colors and save a theme) the version would be updated and the browser would know to download and cache the new version.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Apr/24

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 15 minutes
              1h 15m

                Agile