Skip to content

Service worker assets group installMode: lazy updateMode: lazy doesn't work as expected #25283

Closed

Description

@Serginho

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

With installMode:lazy updateMode: lazy configurations, the service workers downloads all assets.

Expected behavior

With that configuration. installMode: lazy, I expected the service worker only caches requests of assets that the applications requests. That's the behavior described in docs.

With updateMode: lazy, I expected the service worker update only cached files, and not the whole files.

Minimal reproduction of the problem with instructions

configure assets in this way:

{
      "name": "assetsLazy",
      "installMode": "lazy",
      "updateMode": "lazy",
      "resources": {
        "files": [
          "/assets/**"
        ]
 }

Build and run in production, the service worker will caches all assets.

What is the motivation / use case for changing the behavior?

Environment


Angular version: 5.2.11


Browser:
- [X] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX 8.9.4
- Platform: Mac
Others:

Activity

  1. added this to the needsTriage milestone on Aug 3, 2018
  2. gkalpak commented on Aug 3, 2018

    @gkalpak
    Member

    This should have been fixed by #24127. If this is still an issue with the latest version, please open a new issue, providing the necessary details (including a minimal reproduction).

  3. Serginho commented on Aug 3, 2018

    @Serginho
    ContributorAuthor

    Ok. I'm seeing it was fixed on 6.1.0 Thx

  4. angular-automatic-lock-bot commented on Sep 13, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: service-workerIssues related to the @angular/service-worker package

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions