---
title: "Discussion on \"How to call a function on URL change in javascript\" | Hashnode"
description: "Discussion on \"How to call a function on URL change in javascript\". Modern JS frameworks tend not to reload the page but manipulate DOM and change URL path for internal navigation, for performance and smooth UX. But since there is no page reload, window.onload event does not get triggered for subsequent navigation. W..."
url: "https://hashnode.com/posts/how-to-call-a-function-on-url-change-in-javascript/5fcbd907685f4f01c470f43d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to call a function on URL change in javascript](https://championshuttler.in/how-to-call-a-function-on-url-change-in-javascript?utm_source=hashnode&utm_medium=feed)

Modern JS frameworks tend not to reload the page but manipulate DOM and change URL path for internal navigation, for performance and smooth UX. But since there is no page reload, window.onload event does not get triggered for subsequent navigation. W...

Dec 5, 2020 · 3 min read · championshuttler.in  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Shivam Singhal](https://hashnode.com/@championshuttler)

@championshuttler · India

  
[View profile](https://hashnode.com/@championshuttler)

Pushing Bugs to Production

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
