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

Cache redirects? #22

Closed
makew0rld opened this issue Jun 27, 2020 · 3 comments
Closed

Cache redirects? #22

makew0rld opened this issue Jun 27, 2020 · 3 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@makew0rld
Copy link
Owner

Add some more functions to the cache package so that it can cache redirects and load them, and have handleURL try to use that, to prevent requesting redirects each time.

The problem is how can the user easily clear the cache? For example this would break the redirect hell test. One way would be a clear cache command, but still there could be unexpected behaviour.

@makew0rld makew0rld added enhancement New feature or request question Further information is requested labels Jun 27, 2020
@makew0rld makew0rld changed the title Cache redirects Cache redirects? Jun 29, 2020
@makew0rld
Copy link
Owner Author

A good related thing to do would be to auto-accept redirects that just add a slash, and remember them. This would improve the UX a lot for those instances. Any other redirect after that initial one would show up to the user though, even if it just adds another slash, or redirects back to the non-slash page, as a malicious attack.

@makew0rld makew0rld added this to the v1.4.0 milestone Jul 17, 2020
@makew0rld
Copy link
Owner Author

Only permanent redirects, status code 31, should be accepted.

@makew0rld
Copy link
Owner Author

Permanent redirects are now cached for the browser session, if the user accepts them. Auto-accepting redirects that just add a slash could be an issue for another time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant