Wordpress LScache Plugin: Login, does not refresh the page with login with ajax
Last Updated on: Wed, 15 Apr 2026 00:00:02 I am using a plugin for login login with ajax its build in the theme. But once you have logged in, you have to refresh the page 1 time. Otherwise you think you are not logged in yet. What do you recommend to refresh page after login? Thank you in advance. ps: LiteSpeed Cache v3.6.4 is installed. This topic was modified 1 year, 7 months ago by MEMT-NETWORK. Hi, sadly there is no good solution for such case , you will need to make your login to do a refresh or redirect for once , in order to make webserver to send new pages you can use JS way location.reload() to reload the page , or login_redirect , or wp_redirect e.g. function wpse125952_redirect_to_request( $redirect_to, $request, $user ) // instead of using $redirect_to were redirecting back to $request return $request add_filter(login_redirect, wpse125952_redirect_to_request, 10, 3) Best regards, Not sure that i understand, as this is the same issue that has been solved in the past, or has worked in the past -> https://wordpress.org/support/topic/users-have-to-login-twice/ => exact the same issue, login twice works, or do a hard refresh works after first login attempt. In version 2.8.5 this has worked is stated. https://wordpress.org/support/topic/login-problem-with-cache-2/ https://wordpress.org/support/topic/login-not-refreshing-after-logging-in/ and a couple of other tickets that I can find. Hi, yeah , many things could have changed in these years some patches may or may not to a different plugins for how it is made , I mean different plugins have different ways to do same things. have you tried my code snippet ? add it into your active theme functions.php file Best regards, Yes, I tried it. I copy and paste it in my childs function theme. But no results. The theme is 100% build with all wordpress guidelines. The Login with Ajax plugin has even an option to refresh the page. But this has not been checked to disable it. see printscreen: https://ticksy_attachments.s3.amazonaws.com/14.04.2021_16.58.51_REC_410.png Update: Think i found the issue in your plugin. i have set instant-click to off, and this seems to fix the issue. Is this something that you can look into, in the next plugin update? Hi, thats how instant click works , it may not load the page as normal browser does and could cause interfere with certain function Best regards, I understand, is it not possible to build in an exception for instant click for login forms? Hi, sadly no , we dont have feature for this kind of set up : ( Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference