Window load not working as excpected ?

Window load not working as excpected ?

Im using two php post methods in window.load function, the first php post data is working perfectly, and second php page Profile.php is working alternatively i mean on first reload it is working, after reloading it again it isnt working. vice versa . . Not knowing where the problem is..!!
  1. $(window).on('load',function(){
  2. if(localStorage.getItem('verify')==1){
  3.   if(localStorage.getItem('claim') == 0){ 
  4.     if(localStorage.getItem('delete') == 0){
  5. $.post("/Web_Service/Load.php",function(data){
  6.  $('.name>p').html(data.Name);
  7.      $('.cover').css('background-image', 'url('+ data.Pic+')');
  8.  $('#Name').val(data.OName);
  9. },'json');
  10. $.post( "Web_Service/Profile.php",function(data){
  11. //content for this php page 
  12. },'json');
  13.    }
  14.  }
  15. }
  16. });