title: Redirect after login , cached page issue - Javascript
body: <p>I'm encountering a problem with the creation of a redirect after login ajax, essentially after a correct login (for example, from the home page), I get redirected to a new page. While i'm in this new page, if i click on a link that takes me back to the home page, the home page is in the non-logged version. As if the browser maintain a cache version. In fact, simply by updating this page with F5 the page refreshes and i resulted logged in.</p>
  
  <p>Do you have any suggestions?</p>
  
  <p><strong>Edit: I'm using Wordpress LoginWithAjax Plugin</strong></p>
  
  <pre><code>/Make Ajax Call
      $.post(url, postData, function(data){
          lwaAjax( data, 'LoginWithAjax_Status', '#login-with-ajax' );
          if(data.result === true){
              //Login Successful - Extra stuff to do
              if( data.widget != null ){
                  $.get( data.widget, function(widget_result) {
                      $('#LoginWithAjax').replaceWith(widget_result);
                      $('#LoginWithAjax_Title').replaceWith($('#LoginWithAjax_Title_Substitute').text());
                  });
              }else{
                  if(data.redirect == null){
                      window.location.reload();
                  }else{
                      window.location = data.redirect;
                  }
              }
          }
      }, "json");
  }); 
  </code></pre>