• Resolved Aditya Agarwal

    (@adityamilyin)


    Hi,

    I have a wordpress site, that shoes different content for logged in and logged out users.

    The content itself works perfectly.

    But, if I visit a page as logged out user, then login and go back to the same url, I still see the content of logged out user.

    Clearing the cache or deactivating Super PWA plugin solves this issue.

    Is there anyway to clear the cache for SuperPWA on login and logout?

    It makes my site almost useless for logged in users as they cant see the necessary features.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author SuperPWA

    (@superpwa)

    Can you please share a short video recording of the issue you are encountering? We will analyze it and help you resolve the issue.

    Thread Starter Aditya Agarwal

    (@adityamilyin)

    Sure.

    Here’s the video.

    My site shows the option to login register and reset password in the top menu, for the logged out users. But no such option is displayed for logged in users.

    As you can see in the below attached video
    https://drive.google.com/file/d/1YrAMftlet5dpLW8xELiniGoDfcY36n1Z/view?usp=sharing

    I first open a url and hover over “account” to show that the login and register options are there.

    Then in the other tab, I login to my account (wp-admin) and then I go to the same link again.

    and refresh.

    It doesnt help. I even try CTRL + R but still the loaded page has the same menu options.

    The link on which I tried this was Dolby Vision vs HDR 10 vs HDR 10+ vs HLG vs AHDR Which HDR Should You Get?

    Below is the screenshot of the same url after I have clear my cache and storage of browser.

    https://snipboard.io/zLDP2N.jpg

    Thread Starter Aditya Agarwal

    (@adityamilyin)

    No response recieved since 2 days regarding this matter.

    Is there any additional information needed?

    Incase you wanna try, I can send you the login credentials of my wp-admin

    Also, I can confirm that deactivating this plugin resolves the issue.

    If you could provide a JS code to clear Service Worker Cache and unregister it, it would be really useful

    Plugin Author SuperPWA

    (@superpwa)

    We are looking into your issue, We will let you know back.

    • This reply was modified 4 years, 1 month ago by SuperPWA.
    Thread Starter Aditya Agarwal

    (@adityamilyin)

    Any Update in this matter?

    i have a problem on Standalone PWA, admin bar login not appear, maybe this same issue, i try this code on footer themes and all work

    <?php if (is_user_logged_in()) { ?>
    <script>
    	if (window.matchMedia('(display-mode: standalone)').matches) {*/
    		jQuery(document).ready(function($) {
    			var querystring = '?loginapp=true';
    			$('a').not('[href="#"]').each(function() {
    				var href = $(this).attr('href');
    				if (href) {
    					$(this).attr('href', href + querystring);
    				}
    			});
    		});
    	}
    </script>
    <?php }?>

    sometimes url cached, for my issue i change the all link on pwa standalone mode when user is login.

    i hope this fixed your issue

    • This reply was modified 3 years, 8 months ago by Gunawan Gee.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Clear Cache on Login and Logout’ is closed to new replies.