Skip to content

Service Worker: try to access to a static file always refer to 'index.html'? #3975

@littlee

Description

@littlee

Is this a bug report?

Maybe yes

I put a image file in /public/ as /public/images/share.png, and in production, when I try to access this image in browser (by putting in address in address bar) with 'https://mydomain/images/share.png', the browser always open the main page (/public/index.html).

And I update my Chrome to latest version, nothing changed.

And when I access 'https://mydomain/images/share.png', and press crtl+shift+R, it works normally, but if I use the refresh button or press ctrl + R, it open /public/index.html again

After unregistering the service worker, everything works fine.

Is this how service worker works ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions