Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045564Retail ModulesWeb POSpublic2020-12-14 08:292020-12-28 07:27
marvintm 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
RR20Q4.1RR20Q4.1 
marvintm
No
0045564: 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 => RR20Q4.1
2020-12-23 03:48ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-12-23 04:22hgbotResolutionopen => fixed
2020-12-23 04:22hgbotStatusscheduled => resolved
2020-12-23 04:22hgbotFixed in Version => RR20Q4.1
2020-12-23 04:22hgbotNote Added: 0125050
2020-12-28 07:27marvintmReview Assigned To => marvintm
2020-12-28 07:27marvintmStatusresolved => closed

Notes
(0125050)
hgbot   
2020-12-23 04:22   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 60380ef19618e97934ee52f4778b1eaac44216a7
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-12-23T08:52:32+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/60380ef19618e97934ee52f4778b1eaac44216a7 [^]

Fixed ISSUE-45564: 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
---