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

Add config option to set the HTTP redirect code for external icons #2188

Merged
merged 1 commit into from
Jan 2, 2022

Conversation

jjlin
Copy link
Contributor

@jjlin jjlin commented Dec 30, 2021

The default code is 307 (temporary) to make it easier to test different icon services, but once a service has been decided on, users should ideally switch to using permanent redirects for cacheability.

@BlackDex
Copy link
Collaborator

I'm not sure, but won't a 301/308 cause browser to never recheck that specific url again? It will probably depend on the caching of the browser. But it could cause an issue that you can't easily switch to a different icon provide once activated?

@jjlin
Copy link
Contributor Author

jjlin commented Dec 30, 2021

I'm not sure, but won't a 301/308 cause browser to never recheck that specific url again? It will probably depend on the caching of the browser. But it could cause an issue that you can't easily switch to a different icon provide once activated?

Yes, so as mentioned in the doc comments, configuring a 307 redirect is useful if you're testing different icon services. Clearing the browser cache should clear the 308 caching as well, so it shouldn't be that hard to get around.

It's certainly an option to make a 307 redirect the default to make it easier to test different icon services out of the box, but it probably means most users will never know or bother to set the 308 redirect in that case. I could very well be wrong, but I suspect most users interested in an external icon provider will just pick the one they perceive to be most trustworthy, see that it works, and move on.

So I'm not sure there's clearly a best default here. I don't feel that strongly about it though, so if people think 307 is a better default, that's fine with me.

src/config.rs Outdated Show resolved Hide resolved
The default code is 307 (temporary) to make it easier to test different icon
services, but once a service has been decided on, users should ideally switch
to using permanent redirects for cacheability.
@dani-garcia dani-garcia merged commit 76687e2 into dani-garcia:main Jan 2, 2022
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.

4 participants