Could y’all check my understanding. Let’s say that I have a page with 2 different on page load events with the following conditions:
Current user is logged IN → go to page login
do a search for blah: count ≥ 1 → show popup
My understanding is that event 1 happens on the server so it will immediately execute and event 2 will not even be evaluated.
I think @petter shared some tip like that recently that said you could check the redirect number or something of that sort.
Number 1 should trigger on the server and send you to the login page before any page data is loaded.
Number 2 I guess could do the same (since it’s a server-side query), but I don’t know if it actually does.
Would be good to know – do you have this set up? If so you can use the 301 redirect checker to check whether it leads to a 301 redirect (a client-side will return a 200 redirect).
Just remember to remove the logged in event before testing
Sureoak’s tool seemed to be down for a while, but it’s back up now.
I get the same results as you:
200
302
301 and 302 are permanent and temporary redirects (as I’m guessing you already know). Both confirm a server-side redirect, and in many cases 302 makes more sense than 301. 301 is basically for URLs that don’t exist anymore. If you’re redirected for being logged out, it doesn’t mean that the page doesn’t exist.
Anyway, which 3xx code is returned doesn’t really matter to users, since the result is the same. It’s mostly for the search engines.
Logged-in actions should return 3xx, not sure why that’s not the case here. Care to share some more details?
Is your redirect made on a logged in or logged out condition?
If your check is for logged-in status, I think it’s best to check on your devtool network tab instead of the online redirect checkers