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

Proposal: webNavigation.onBeforeRedirect event #164

Open
oliverdunk opened this issue Feb 17, 2022 · 2 comments
Open

Proposal: webNavigation.onBeforeRedirect event #164

oliverdunk opened this issue Feb 17, 2022 · 2 comments
Labels
proposal Proposal for a change or new feature supportive: safari Supportive from Safari

Comments

@oliverdunk
Copy link
Member

At 1Password, we're looking to track redirects as part of a new autosave feature we're working on. In most browsers the existing webRequest.* APIs allow this but understandably Apple have chosen not to implement this in Safari on iOS. After chatting to @xeenon, instead of proposing that entire set of APIs is introduced, I propose adding a webNavigation.onBeforeRedirect event that has similar behaviour to webRequest.onBeforeRedirect but fires only for frame (top and subframe) navigations.

We have the following requirements (which I think are hopefully fairly simple):

  • Tells us about 302 redirects
  • Provides a status code that we can use to see the type of redirect that happened
@Smile4ever
Copy link

Why not implement webRequest.onBeforeRedirect in Safari/iOS?

@oliverdunk
Copy link
Member Author

Why not implement webRequest.onBeforeRedirect in Safari/iOS?

This would definitely solve the problem, but Safari have chosen not to implement webRequest because it fires for all requests and is a noisy API that can keep non-persistent background pages alive. With that in mind - it doesn't feel like an API that has a good chance of being implemented.

@xeenon xeenon added proposal Proposal for a change or new feature supportive: safari Supportive from Safari labels Aug 31, 2022
@xeenon xeenon changed the title Proposal: webNavigation.onBeforeRedirect event Proposal: webNavigation.onBeforeRedirect event Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposal for a change or new feature supportive: safari Supportive from Safari
Projects
None yet
Development

No branches or pull requests

3 participants