php - javascript redirect page and refresh cache at the same time -


i have problem when redirect user after edit profile , edits profile pic. redirect him user page doesnt display edited pic if manualy refresh page. here code of profile_edit.php page redirects profil.php:

<script type="text/javascript"> $(document).ready(function() {     var f = $(\'form\');      var b = $(\'#submit1\'); // upload button       b.click(function(){         // implement ajaxform plugin         f.ajaxform({             beforesend: function(){              },             success: function(e){                 window.location=\'profil.php?user='.$user_session.'\';             },             error: function(e){              }         });     });  }); </script>    

add 1 more parameter url cache busting thing this

window.location=\'profil.php?pram='+math.random()+'&user='.$user_session.'\'; 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -