Sorry if I am being a pest. I noticed in my testing that when I use the back button with page:loaded it is calling multiple events. I am getting full refresh logged 120 times after clicking the back button 4 times.
Tested it like this between two pages. This script is living in the header of the layout.
<!DOCTYPE html>
<html>
<head>
<title>{{ this.page.meta_title | default('Testing') }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="turbo-visit-control" content="enable" />
<script>
console.log("register");
let count = 0;
addEventListener('page:loaded', function() {
console.log("full refresh - " + count);
count++;
});
</script>
</head>
<body>
{% page %}
</body>
{% framework turbo %}
{% placeholder scripts %}
</html>
