# Is there an event for HEAD element transform?

**URL:** <https://discuss.hotwired.dev/t/is-there-an-event-for-head-element-transform/5706>\
**Category:** General\
**Created:** [March 13, 2024, 3:21pm UTC](https://discuss.hotwired.dev/t/is-there-an-event-for-head-element-transform/5706 "2024-03-13T15:21:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arusanov](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/arusanov/32/3685_2.png) [@arusanov](https://discuss.hotwired.dev/u/arusanov)\
**Post date:** [March 13, 2024, 3:21pm UTC](https://discuss.hotwired.dev/t/is-there-an-event-for-head-element-transform/5706/1 "2024-03-13T15:21:07Z")

</div>

Hi, I can see and use events for body morph/replace, but there’s none for the HEAD element.

My case:  
I have pages that include SCIPTS using relative to the page links.  
E.g.  
on /index.html  
it will be `<script src="./_static/script.js">`  
on /some/deep/link/index.html  
it will be `<script src="../../../_static/script.js">`

The script is the same and seems like Turbo doesn’t take the current path into account at treats “…/…/…/\_static/script.js” as a new path, and inserts multiple copies into the head element.

---

<div class="post-metadata">

**Author:** ![tleish](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/tleish/32/920_2.png) [@tleish](https://discuss.hotwired.dev/u/tleish)\
**Post date:** [March 21, 2024, 1:44pm UTC](https://discuss.hotwired.dev/t/is-there-an-event-for-head-element-transform/5706/2 "2024-03-21T13:44:36Z")

</div>

I don’t believe there is an event for this. Turbo compare the entire html tag. If the pattern is different, it assumes it’s a different script and will append it.

The solution in this case would be to make the path the same on both pages (e.g. use absolute paths).

```auto
<script src="/_static/script.js">

```

or

```auto
<script src="https://example.com/_static/script.js">

```
