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
Post a Comment