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

Re-enable history api on file:// protocol #57504

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
6 participants
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jan 10, 2019

Fixes #57135.

I tested locally on chrome (since it was the browser having issues with history management on file:// protocol) and it worked fine so I guess we can re-enable it.

r? @QuietMisdreavus

@ecstatic-morse

This comment has been minimized.

Copy link
Contributor

ecstatic-morse commented Jan 10, 2019

Using history.pushState on a page loaded from file:// throws a SecurityError in Firefox 64, so I don't think you should unconditionally enable this.

As far as I can tell, it looks like history.pushState on a page loaded from file:// throws a SecurityError in Firefox 64 if the pages have different origin. Since opening the search window just adds a query parameter, the calls pushState should be fine for most modern browsers, but you might want to add a comment to this effect.

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Jan 10, 2019

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Jan 11, 2019

The problem was supposed to be only on chrome. My firefox worked correctly though.

@QuietMisdreavus

This comment has been minimized.

Copy link
Member

QuietMisdreavus commented Jan 11, 2019

As far as I can tell, it looks like history.pushState on a page loaded from file:// throws a SecurityError in Firefox 64 if the pages have different origin. Since opening the search window just adds a query parameter, the calls pushState should be fine for most modern browsers, but you might want to add a comment to this effect.

This seems to make it okay? I think we only use the history API when loading up the search results, so it may work out.

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Jan 11, 2019

Normally yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment