khmyznikov/pwa-install

Apple doesn't respect start_url

s0xDk opened this issue ยท 5 comments

s0xDk commented

Consider using history.pushState({}, '', start_url) when user opens "How To For Apple".
This way PWA would be installed with the proper start_url on Apple devices.

Hi! Any potential drawbacks?

s0xDk commented

The only drawback I can see is that the user would have to hit the back button twice to go to the previous page.

s0xDk commented

Actually, history.replaceState is a better option ;)
Nicely done! โœจ

Fixed

s0xDk commented

@khmyznikov I just tested start_url support in Safari once again and it works ๐Ÿ‘€

Seems like I made some mistake while testing this earlier.

I believe you can remove history.replaceState ๐Ÿคฆโ€โ™‚๏ธ

Safari supports start_url since versions 11.3

Sorry for making you add that URL override without proper testing on my side.