Title: Cache Breaks Ajax Login Functionality
Last modified: June 7, 2019

---

# Cache Breaks Ajax Login Functionality

 *  [brunopbarbosa](https://wordpress.org/support/users/brunopbarbosa/)
 * (@brunopbarbosa)
 * [7 years ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/)
 * Hello,
 * i’ve implemented a an ajax login system that reloads the webpage after a sucessfull
   login, depending on the user’s role (different roles have access to different
   contents on the frontend).
 * However, when using this cache plugin, on sucessful login, after the redirect
   the page is shown as if the user hasn’t logged in. Refreshing the page manually
   shows the correct information, confirming that the login was sucessfully made.
 * Disabling the cache plugin the login system works as expected, leading me to 
   believe that there is something related to the cache settings that is showing
   users the previous version of the page.
 * Is there any way i can change this? Can someone point me in the right direction
   on what settings i should use on Swift Performance?
 * Thanks in advance,
    Bruno

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/#post-11622629)
 * Please start sharing the URL of your site.
    Is it frontend login with redirection
   or backend? Is caching for logged in users and/or Merge Assets for Logged in 
   Users enabled?
 *  [bobsapp](https://wordpress.org/support/users/bobsapp/)
 * (@bobsapp)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/#post-11635893)
 * Hello. Thanks for the great plugin. But I have got some issue with swift plugin.
   It blocks normal work of my login plugin(login via sms DIGITS plugin). When I
   purge cache it works fine. Maybe somebody knows how to exclude any plugin from
   cache at all? I dont use merge script or css option, so I cant exclude js files
   via swift “Exclude Scripts” function. Maybe I can write some rules at nginx config
   or use another way to exclude plugin from swift cache? I`ll be very thankful 
   for any help. Thanks.
    -  This reply was modified 6 years, 12 months ago by [bobsapp](https://wordpress.org/support/users/bobsapp/).
 *  Thread Starter [brunopbarbosa](https://wordpress.org/support/users/brunopbarbosa/)
 * (@brunopbarbosa)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/#post-11696024)
 * [@fredawd](https://wordpress.org/support/users/fredawd/) Sorry it took so long
   to get back to you.
 * the website is located here: [https://sinks.rodi.pt/en/login/](https://sinks.rodi.pt/en/login/)
 * it is a frontend login with redirection, using ajax.
 * Caching is disabled for logged in users, as well as merge assets.
 * Thanks for your help!
 *  Thread Starter [brunopbarbosa](https://wordpress.org/support/users/brunopbarbosa/)
 * (@brunopbarbosa)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/#post-11759683)
 * [@fredawd](https://wordpress.org/support/users/fredawd/) sorry to bother, but
   is there any update on this?
 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/#post-11759831)
 * Did you exclude login page from cache?
 *  Thread Starter [brunopbarbosa](https://wordpress.org/support/users/brunopbarbosa/)
 * (@brunopbarbosa)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/#post-11759873)
 * Hello [@fredawd](https://wordpress.org/support/users/fredawd/), thanks for your
   reply.
 * Login page is excluded, but there is a redirection to the homepage on sucessfull
   login, and at that point the homepage looks like the user hasn’t logged in yet.
 * If the user navigates to any other page after that, it shows the user menu properly,
   but not on that first redirection.
 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/#post-11760301)
 * We’re not able to reproduce this from our side, so maybe it’s a third party plugin
   issue? Either way, contact us over at our support center (fred@swteplugins.com)
   and one of our technicians can experience this first-hand for your site and help
   to figure out why this is happening for your installation.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Cache Breaks Ajax Login Functionality’ is closed to new replies.

 * ![](https://ps.w.org/swift-performance-lite/assets/icon-256x256.jpg?rev=2388229)
 * [Swift Performance Lite](https://wordpress.org/plugins/swift-performance-lite/)
 * [Support Threads](https://wordpress.org/support/plugin/swift-performance-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/swift-performance-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/swift-performance-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/swift-performance-lite/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [login](https://wordpress.org/support/topic-tag/login/)

 * 7 replies
 * 3 participants
 * Last reply from: [Fred](https://wordpress.org/support/users/fredawd/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/cache-breaks-ajax-login-functionality/#post-11760301)
 * Status: not resolved