When I click on a link in my site it takes me to a new page in the same tab. The prefix in the displayed url within the browser and the page content does update. The canonical url within the element inspector however doesn't change to the new url.
I start at
<link rel="canonical" href="mywebsite.com/page1">
then proceed to click on a link which takes me to mywebsite.com/page2, but the canonical url remains as page1, even though I'm looking at page2. How can I make sure the canonical url updates when I'm taken to a new page?