Add location.replace() method demo code