After login redirection

Right now, there is an issue on the site. In the header, there is a “Sign In” button. After the user signs in, for some reason the homepage still shows the “Sign In” button instead of the logged-in user. On all other pages, it shows correctly, unless we do a hard refresh.

I want that once the user logs in, they should be redirected to the homepage, so that this issue does not happen.

Hi,

This issue is caused by caching (either by the hosting provider or a caching plugin). The user’s status changes, but the cached static HTML is still being displayed, so the page doesn’t update accordingly.

If you redirect from other pages, you’ll run into the same issue again once the user lands on the home page, since the cached version is served. Also, using a static redirect for the login form is not ideal. The current behavior is logical: when the user clicks “message”, “favorite”, etc., the login modal opens, the page refreshes, and after logging in, the user can continue exactly where they left off, instead of being sent back to the home page (or other page) and having to search for the listing again.

Disabling or adjusting caching for logged-in users is the proper solution here.

Please let me know if you need further assistance.