01-21-2020, 02:22 PM
(01-21-2020, 01:47 PM)Simpsons Dumper Wrote: It would be more user-friendly if logging in on the websites returned the user to the page s/he was previously viewing.
The websites frequently log me out due to third-party cookie preferences and it's annoying being redirected to the homepage after logging in to leave a comment or something.
The login page already has this flexibility - it just needs to be passed the proper address. The login page always appends a trailing slash to the return redirect, which I'd personally do away with to avoid a bit of headache, but you wouldn't have to do away with it.
If you are willing to make the login page not append a slash on the return redirect, you can achieve this functionality by sticking something like this after where the Spriters etc. pages spit out the current login path:
...or something like this if you'd rather leave the login page alone:PHP Code:echo ($_SERVER['PHP_SELF'] != '/index.php') ? $_SERVER['PHP_SELF'] : '/';
PHP Code:if ($_SERVER['PHP_SELF'] != '/index.php') echo rtrim($_SERVER['PHP_SELF'], '/');
Also, I don't know what sort of hosting you have, but if you can enable HTTP/2 that could help pages with many resources a fair bit performance-wise, especially on high-latency connections. Just thinking of those pages that have hundreds of sheet icons.
I don't want to get into too many technical specifics here but I will answer these as well as I can without them. For the login redirect, I get what you're saying but it can't be done the way you're suggesting. I originally looked into returning to the originating page but ran into some issues and set it aside. I'm pretty sure I have a working solution for it which I'll try to add in shortly.
As for HTTP/2, again without going into specifics, I can't enable it at this time though I'd definitely like to.