Skip to content

Conversation

@AdaRoseCannon
Copy link

@AdaRoseCannon AdaRoseCannon commented Jan 13, 2020

According to https://developer.mozilla.org/en-US/docs/Web/Manifest/start_url#Relative_URL

the start_url, if a relative URL like '.', should point to a path relative to the manifest.

After testing the install in Samsung Internet, this results in a broken link because it points to the folder containing the manifest:

localhost:8080/static-336ee288886f5728e1191e9ada2aeba5eb0bbd76/out/vs/server/src/media/

Which is the correct behaviour, but the expected behaviour is that it points to the root of the project.

An alternative change would be to: ../../../../../../

Describe in detail the problem you had and how this PR fixes it

After using add to homescreen in Samsung Internet on Android the window is pointing at the wrong path.

This fixes the issue by pointing to '/' instead of the manifest location '.'

image

According to https://developer.mozilla.org/en-US/docs/Web/Manifest/start_url#Relative_URL

the start_url, if a relative URL like '.', should point to a path relative to the manifest.

After testing the install in Samsung Internet, this results in a broken link because it points to the folder containing the manifest:

`localhost:8080/static-336ee288886f5728e1191e9ada2aeba5eb0bbd76/out/vs/server/src/media/`

Where the expected behaviour is that it points to the root of the project.

An alternative change would be to: '../../../../../../'
@code-asher
Copy link
Member

code-asher commented Jan 13, 2020 via email

@AdaRoseCannon
Copy link
Author

That would be the case, although setups like that i don't think are common since you lose the protections of running the 3rd party code on a subdomain.

In addition it would be very fragile and break if you were to change the level of nesting.

@AdaRoseCannon
Copy link
Author

An alternative would be to move the manifest.json to the root of the project and keep the '.' value for start_url.

Although I wouldn't know the best way to do that for this project.

@code-asher
Copy link
Member

code-asher commented Jan 15, 2020 via email

@AdaRoseCannon
Copy link
Author

That sounds like a good idea, i'll close this R then and open an issue.

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

Successfully merging this pull request may close these issues.

3 participants