- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.6k
Don't redirect when loading files index page #31143
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
Conversation
| Alternate idea: don't do the redirection when the dir parameter is defined. That probably will kill most of the useless redirection without killing a backward compatible link. | 
| the "fileid" in URL is authoritative, we need it for the links to work when copy-pasted elsewhere, because the path itself might change for example test this: 
 thanks to the fileid it can find the actual folder again now, I'm not sure why we have the original redirect in place from "?dir=xxx&fileid=123" to "?dir=xxx", probably a bug | 
| I found this: 5e5c5a1 so it seems this controller is the entry point for both the URL format "?dir=xxx&fileid=123" and the private link format "/f/123". in the case of a private link, the redirect makes sense, but not for when the URL already has the target format your PR probably breaks links with "/f/$fileid" now, so we should add a condition there | 
61fe5e0    to
    5d83a60      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Currently we are redirecting from ?dir=/&fileid=2 to ?dir=/. This is an issue because we then need to load two pages with full file system setup and authentification instead of one and the assets won't start loading until the second page is delivered to the user. Additionally when loading ?dir=/, we then change the url back to ?dir=/&fileid=2 (without reload) so that the next time we load the page again we do the same thing again. Depending on the speed of the server and internet connection we can save 100ms to 400ms, improving the user experience. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
5d83a60    to
    028ca09      
    Compare
  
    | /backport to stable23 | 
| /backport to stable22 | 
| It seems this caused a Drone error. After this was merged, all  Okay, given the affected files it is pretty clear that this caused it. @CarlSchwan @PVince81 please review. | 
| potential regression: #32177 | 
Currently we are redirecting from ?dir=/&fileid=2 to ?dir=/. This is an
issue because we then need to load two pages with full file system setup
and authentification instead of one and the assets won't start loading
until the second page is delivered to the user.
Additionally when loading ?dir=/, we then change the url back to
?dir=/&fileid=2 (without reload) so that the next time we load the page
again we do the same thing again.
Depending on the speed of the server and internet connection we can save
100ms to 400ms, improving the user experience.
Questions:
then were is no need to kill the redirection as this won't happen each time but
only when visiting an old URL with &fileid= in the url
Signed-off-by: Carl Schwan carl@carlschwan.eu