As title, I'm thinking of is it possible to tell browser that after user visited a page with URL https://example.com/somepath?q=somequery
and with a canonical URL tag <link rel="canonical" href="https://example.com/somepath" />
, then this link <a href="https://example.com/somepath"></a>
is set to :visited
?
Asked
Active
Viewed 54 times
3

Trantor Liu
- 8,770
- 8
- 44
- 64
-
2I have a hard time understanding the wording, but feel this is a good question. Is it this: After a user visited a page with a canonical URL tag, all other links to that same canonical URL should display as visited? – Marcel Nov 21 '17 at 07:13
-
Using a server side language you can do so – M0ns1f Nov 21 '17 at 07:41
-
You could try `history.replaceState({}, {}, '[canonicalURl]')` on the visited page. – sideroxylon Nov 21 '17 at 08:47
-
@Marcel Yes you're right! – Trantor Liu Nov 22 '17 at 11:33
-
@M0ns1f But it also change the behavior of next/prev page buttons on browser. – Trantor Liu Nov 22 '17 at 11:34