One way to deal with it is to give the heading on the next page and the link that was clicked on this page the same fixed view transition name "xyz", and have no names on the other links. This can not be done in static HTML but it can be done with the help of an event listener.
An alternative is to give each link its own view transition name and as soon as we know which link was clicked, we set exactly this name as the view transition name in the heading on the target page. This can also be done using an event listener. This second approach also has the advantage that it is easier to define a reversal. It would therefore also work with the browser's back button. However, the HTML file is more cluttered and the performance may be less good with a larger number of transition names.
Back to the previous page
Continue to the next page.