Unlock this challenge:
What is the biggest way in which JavaScript works differently on Turbo-enabled websites?
There are no significant differences between a normal website and a Turbo Drive powered site. That's what makes Turbo so great: you can use it on any site without major changes.
The difference is that, when Turbo Drive loads a new page, every JavaScript script is parsed and executed again to ensure that the new page has been reinitialized properly. This includes old scripts that don't get removed!
The difference is that, when Turbo Drive loads a new page, <script> tags that were present in the previous page, don't get parsed and executed again, as you might expect with a normal page load.
<script>
The difference is that, when Turbo Drive loads a new page, new script tags found in the <body> tag are parsed but not executed. You need to move these to the <head> tag for them to be parsed.
<body>
<head>