Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045565Retail ModulesWeb POSpublic2020-12-14 08:292020-12-28 07:28
marvintm 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
RR20Q3.3RR20Q3.3 
marvintm
No
0045565: Service workers infrastructure precaches CSS files that are then never used
Currently there is code inside the Service workers/AppCacheManifest infrastructure that adds CSS files belonging to external modules automatically to the Manifest as separate requests:

MobileCoreApplicationCacheComponent.java: method getcssFileList()
cache-manifest-ftl <#list data.cssFileList as cssFile>
${cssFile}
</#list>

This causes the Service Worker to request and store those files separately. However, the WebPOS application then never formally requests them, as their content is already present inside the main StyleSheetResources request.

Therefore, we are wasting quite a bit of bandwidth and triggering many unnecessary requests.
 
Go to livebuilds and access the modules instance. Check in developer tools and see that many css requests exist separately, coming from the Service Worker.

Then reload the page (F5), and realise that those css files are never actually requested by the application.
Delete both the getcssFileList method inside MobileCoreApplicationCacheComponent.java and the corresponding CSS section inside cache-manifest-ftl
No tags attached.
blocks defect 0045561 closed ranjith_qualiantech_com Service workers infrastructure precaches CSS files that are then never used 
Issue History
2020-12-14 11:16shuehnerTypedefect => backport
2020-12-14 11:16shuehnerTarget Version => RR20Q3.3
2020-12-23 03:48ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-12-23 04:19hgbotResolutionopen => fixed
2020-12-23 04:19hgbotStatusscheduled => resolved
2020-12-23 04:19hgbotFixed in Version => RR20Q3.3
2020-12-23 04:19hgbotNote Added: 0125049
2020-12-28 07:28marvintmReview Assigned To => marvintm
2020-12-28 07:28marvintmStatusresolved => closed

Notes
(0125049)
hgbot   
2020-12-23 04:19   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 4c322a9af87ca7e605c70a6e125ea7746a9b8e67
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-12-23T08:49:03+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/4c322a9af87ca7e605c70a6e125ea7746a9b8e67 [^]

Fixed ISSUE-45565: Removed CSS Componenet in Cache Component

---
M src/org/openbravo/mobile/core/BaseCoreAppCacheResourceProvider.java
M src/org/openbravo/mobile/core/MobileCoreApplicationCacheComponent.java
M src/org/openbravo/mobile/core/templates/cache-manifest.ftl
---