Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken in Safari 14 ? #25

Open
bbsimonbb opened this issue Nov 20, 2020 · 3 comments
Open

Broken in Safari 14 ? #25

bbsimonbb opened this issue Nov 20, 2020 · 3 comments

Comments

@bbsimonbb
Copy link

This appears not to be working for me in Safari 14. I'm a bit hampered because my app doesn't have a build step, but I've got it working for Chrome. In safari, I can follow with the debugger into the service worker. Something is happening, but the debugger bounces around and the result is inconsistent. Sometimes some offline functionality is available. I'm tearing my hair out.

@jeffposnick
Copy link
Contributor

I was going to say that I recently saw a similar question on Stack Overflow... but it looks like that was from you 😄

If your web app fundamentally doesn't work with AppCache, without this service worker tooling added, then I think that's a bug to raise with the WebKit team. If something broke related to the core AppCache implementation in Safari 14 (where AppCache, I believe, is still meant to be implemented), I could imagine that might also affect the initialization of this polyfill library.

@bbsimonbb
Copy link
Author

I've narrowed this down a bit. I believe our issue is due to different behaviour for urls with an anchor. Chrome will happily understand that a request for myOfflinePage.html#someAnchor corresponds to the app-cache entry myOfflinePage.html. App cache behaves like this. Safari however wants the url to match exactly, and the anchor breaks it. Can we fix this in the polyfill ?

@jeffposnick
Copy link
Contributor

I'd hesitate to explicitly fix it in the polyfill if it's a bug that Apple inadvertently introduced in Safari 14. Can you go the route of filing a WebKit bug with reproduction detail, ideally just involving AppCache, and not this polyfill, i.e. as basic as possible? If it turns out that this is an intentional change and it does make sense to special-case the logic in the polyfill somehow, then we can revisit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants