01-21-2020, 01:47 PM
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:
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.
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:
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.