How to reload a page after clicked ok using sweetalert

You can try this, it works for me.

swal({
       title: "Good job", 
       text: "You clicked the button!", 
       type: "success"
     },
   function(){ 
       location.reload();
   }
);

Use the callback function...

Swal.fire({
  // Swal Setting's
}).then((result) => {
  // Reload the Page
  location.reload();
});

For Sweet Alert 2, this will work.

swal("Good job!", "You clicked the button!", "success").then(function(){
    location.reload();
});

As you can see migration guide

Sweet Alert 2 uses Promise


The answer from Yoshioka did not work for me, I did this and it worked perfectly:

swal({title: "Good job", text: "You clicked the button!", type: 
"success"}).then(function(){ 
   location.reload();
   }
);