Skip to content

v0.4.0

Compare
Choose a tag to compare
@marutypes marutypes released this 02 Sep 18:00
· 62 commits to master since this release

Head Asset Tracking Take Two

NOTE: This functionality is experimental, has changed significantly since 0.3.0, and may change again in the future before 1.0

When a <script> or <link> tag with a unique name in it's data-turbolinks-track is encountered in a response document Turbograft will insert it into the active DOM and, if it's a script, force it to execute.

If an asset with a different src/href but the same data-turbolinks-track value is found upstream, turbograft will force a full page refresh. This prevents potential multiple executions of a script bundle when a new version of your app is shipped.

As of version 0.4.0, this functionality has been made backwards compatible. If data-turbolinks-track="true" head assets are present, turbograft will cause a full page refresh when the set is changed in any way.