Using NextJS router my website is receiving the same image.
// user/[id]
const router = useRouter();
const { id } = router.query as {
id: string;
};
return (
<div>
<p>{id}</p>
<img src={...}/>
</div>
)
On page user/1 the image is correct. Clicking a button on page to user/2 displays the correct image for 2. When clicking back on the browser or window.history.back() to user/1 the image is still of user 2.
How do I do a complete refresh on the page to ensure the cache isn't used?