Support » Fixing WordPress » Logging out, and browser cache

  • Sorry if this has been asked (and answered) elsewhere, but I haven’t been able to find it.

    I created a WordPress site for a client that’s “for members only,” containing some sensitive content. Everything’s working fine, and all’s well, with the exception of logging-out.

    I’m using wp_logout_url(“http://somewhere.else”)to get the visitor out of the site, and redirect them to a public page, which works fine, however, the “for members only” site remains in the browser cache, so even though the logout & redirect were successful, you can hit the “back” button in the browser, and see the last “private” thing the member was viewing.

    Of course, a page reload fixes that (I’m routed-back to the login screen correctly on reload), but if the member is on a public computer (internet cafe, or what have you), it’s bad news, for sure (this is very confidential information).

    I’m trying to build all of this without modifying the WordPress core, or any of the “off-the-shelf” plugins, however, it is a custom theme, and I can implement anything at that level.

    Thanks in advance for any help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • This is on the front side correct? They are not logging into the dashboard.

    Thread Starter tom92024

    (@tom2652)

    Correct…. I’m using a plugin (WP Block Admin) to hide the admin bar from the regular users, so all they’re ever seeing is the front side.

    If they are truly logged in to the back-side but can’t see it then the normal wp logout should work. Maybe link a logout button to http://yoursite.com/wp-login.php?action=logout&_wpnonce=1b8ea328d0

    The wp logout clears the cache as it goes as the back button just leads back to the sign-on page.

    Thread Starter tom92024

    (@tom2652)

    I’ve tried that, and it presents a couple of problems (in this case)…

    First, it stops on an “are you sure you want to logout?” page (which most users ignore, or never see if they’re thinking the click logged them out), and it doesn’t support the auto redirect to an external URL (a requirement for this project).

    I just keep thinking (maybe I shouldn’t be <smile>) that there should be a wp_logout_url() argument that provides that same functionality, but I keep coming up empty.

    First, it stops on an “are you sure you want to logout?” page

    I have never seen that page. Could it be a theme thing?

    Check http://codex.wordpress.org/Function_Reference/wp_logout_url#Logout_and_Redirect_to_Another_Site

    Thread Starter tom92024

    (@tom2652)

    It causes WordPress to generate the “WordPress Failure Notice” page. That’s a part of the WordPress core (I found it around line 2726 in /wp-includes/functions.php).

    The comments indicate that it’s supposed to display the “Are You Sure?” message.

    This is what I found. 'You are attempting to log out of %s' ), get_bloginfo( 'sitename' and with a child theme you should be able to get rid of that pretty easily. BTW for me the comment started on line 1911 but I am using a 3.4 beta – still I find that a little strange.

    I have been searching the answer of this issue days and days, but got nothing to fix it. Can anyone if you know how to get rid of this “WordPress Failure Notice” page, please let me know. I tried some suggestions from other places, but this page still show up. Very frustrate. Please help!! Thank you so much.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Logging out, and browser cache’ is closed to new replies.