Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.10.0-b1
-
Component/s: Client Interface, Staff Interface
-
Labels:None
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.