0

I want to reload another page during success in Ajax

success: function(data) {
      var partA = '/partA-revenue-yesterday';
      var location = partA;
      console.log(data);
      location.reload(partA);
    },

where var partA is a route on the same website

Danielle Rose Mabunga
  • 1,676
  • 4
  • 25
  • 48

1 Answers1

0

The Location.reload() method reloads the resource from the current URL.parameters it accepts is true or false , if its true then page current reloads with hard refresh and no cache

Use Location.replace() method , which replaces the current resource with the one at the provided URL.

Want to know how to manipulate the URL .Click here

Community
  • 1
  • 1
Amar Singh
  • 5,464
  • 2
  • 26
  • 55