From 1fe12477a02656cb4e1faea2ec5c6346ca843778 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 27 Mar 2020 17:00:38 +0200 Subject: [PATCH] Update javascript-modify-url-without-reload.md --- blog_posts/javascript-modify-url-without-reload.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blog_posts/javascript-modify-url-without-reload.md b/blog_posts/javascript-modify-url-without-reload.md index 61d50cc85..2df464bfe 100644 --- a/blog_posts/javascript-modify-url-without-reload.md +++ b/blog_posts/javascript-modify-url-without-reload.md @@ -13,7 +13,7 @@ The HTML5 [History API](https://developer.mozilla.org/en-US/docs/Web/API/History ```js // Current URL: https://my-website.com/page_a -const nextURL = 'https://my-websiste.com/page_b'; +const nextURL = 'https://my-website.com/page_b'; const nextTitle = 'My new page title'; const nextState = { additionalInformation: 'Updated the URL with JS' }; @@ -32,7 +32,7 @@ The older [Location API](https://developer.mozilla.org/en-US/docs/Web/API/Locati ```js // Current URL: https://my-website.com/page_a -const nextURL = 'https://my-websiste.com/page_b'; +const nextURL = 'https://my-website.com/page_b'; // This will create a new entry in the browser's history, reloading afterwards window.location.href = nextURL;