Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Problems with 301 redirects on /bin #880

Closed
harding opened this Issue Jun 7, 2015 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

harding commented Jun 7, 2015

When loading a file or directory beneath '/bin' that doesn't exist, a 301 permanent redirect to '/bin'. The problem is that the permanent redirect is cached by the browser permanently, preventing you from accessing a file or directly that later appears at that location.

For example, if you tried to load /bin/bitcoin-core-0.11/test/ before it was uploaded, your browser will always send you to /bin when you try to load the current RCs. I believe @Michagogo encountered this problem and discovered that Chrome doesn't even let power users reset its redirect cache.

I myself have encountered this problem while developing for the site, although Firefox has a setting in about:config to disable the cache, so it wasn't as bad for me.

@saivann is it possible (and a good idea) to use a less permanent redirect status code?

To clarify, you are able to simply clear the cache wholesale. There's also
an option in the dev tools to disable the cache as long as the dev tools
are open. It's just that neither of those options are immediately
accessible, they require going through dev tools or settings, which is a
hassle, as opposed to Ctrl-Shift-R, which isn't an option because there
isn't a page to reload...

On Sunday, June 7, 2015, David A. Harding notifications@github.com wrote:

When loading a file or directory beneath '/bin' that doesn't exist, a 301
permanent redirect to '/bin'. The problem is that the permanent redirect is
cached by the browser permanently, preventing you from accessing a file or
directly that later appears at that location.

For example, if you tried to load /bin/bitcoin-core-0.11/test/ before it
was uploaded, your browser will always send you to /bin when you try to
load the current RCs. I believe @Michagogo https://github.com/michagogo
encountered this problem and discovered that Chrome doesn't even let power
users reset its redirect cache.

I myself have encountered this problem while developing for the site,
although Firefox has a setting in about:config to disable the cache, so it
wasn't as bad for me.

@saivann https://github.com/saivann is it possible (and a good idea) to
use a less permanent redirect status code?


Reply to this email directly or view it on GitHub
bitcoin#880.

Contributor

saivann commented Jun 8, 2015

Ah I see. I've just set the default 404 error page for the /bin/* subdirectory (while keeping a redirect to / for the rest of the website). Is that better?

Contributor

harding commented Jun 8, 2015

Confirmed that 404 on /bin is working. @Michagogo, what do you think?

Contributor

harding commented Jun 12, 2015

I think this is fixed satisfactorily---thanks, @saivann. Closing.

@harding harding closed this Jun 12, 2015

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