# Turbo frame with an advance action does not replace page title

**URL:** <https://discuss.hotwired.dev/t/turbo-frame-with-an-advance-action-does-not-replace-page-title/3982>\
**Category:** General\
**Created:** [March 30, 2022, 11:50am UTC](https://discuss.hotwired.dev/t/turbo-frame-with-an-advance-action-does-not-replace-page-title/3982 "2022-03-30T11:50:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rockwell](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/rockwell/32/1884_2.png) [@rockwell](https://discuss.hotwired.dev/u/rockwell)\
**Post date:** [March 30, 2022, 11:50am UTC](https://discuss.hotwired.dev/t/turbo-frame-with-an-advance-action-does-not-replace-page-title/3982/1 "2022-03-30T11:50:16Z")

</div>

Hi.

So, i have a simple straightforward setup which looks like this(bare bone).

```nohighlight
<a data-turbo-action="advance" href="a url"></a>

```

When advancing, the page url changes successfully. However, i noticed that the page title does not change. Is that an expected behaviour of Frames?.

Thanks.

---

<div class="post-metadata">

**Author:** ![akshayKhot](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/akshaykhot/32/2544_2.png) [@akshayKhot](https://discuss.hotwired.dev/u/akshayKhot)\
**Post date:** [April 5, 2022, 3:45am UTC](https://discuss.hotwired.dev/t/turbo-frame-with-an-advance-action-does-not-replace-page-title/3982/2 "2022-04-05T03:45:01Z")

</div>

Upon receiving the response, Turbo Drive replaces the whole `<body>` element and merges the contents of the `<head>` element. So it should use whatever title is present on the new response. Whether it changes or not depends if you are sending the same title in your response from the back-end.

If you reload the page after clicking the link, do you see your new title?

Also, the default visit action is `advance` ([source](https://turbo.hotwired.dev/handbook/drive#application-visits)), so you don’t have to specify it using the `data-turbo-action` attribute.

I hope that helps.

---

<div class="post-metadata">

**Author:** ![rockwell](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/rockwell/32/1884_2.png) [@rockwell](https://discuss.hotwired.dev/u/rockwell)\
**Post date:** [April 5, 2022, 11:32am UTC](https://discuss.hotwired.dev/t/turbo-frame-with-an-advance-action-does-not-replace-page-title/3982/3 "2022-04-05T11:32:00Z")

</div>

Hey, thanks for your response. Lemme elaborate

quote=“akshayKhot, post:2, topic:3982”]  
If you reload the page after clicking the link, do you see your new title?  
[/quote]

Yes. If i reload i see the title.

> [@akshayKhot](#):
>
> So it should use whatever title is present on the new response. Whether it changes or not depends if you are sending the same title in your response from the back-end.

Actually, i am sending it. Here is a snippet of the response

Weird thing, i just checked the response, and it seems the `content_for` cals are empty!

 ![Screenshot 2022-04-05 at 14.30.29](https://canada1.discourse-cdn.com/flex027/uploads/stimulusjs/original/2X/9/94acb53c245b42d0c1dc3ea81c9ab90a7f505497.png)

Is that the default behaviour for frames?. Sorry, i’m not that versed with Frames.

```ruby
<% content_for :title, t('page_title.capture.qr_codes.new', business_name: @business.name) %>

<% content_for :meta do %>
  <meta name="turbo-cache-control" content="no-preview">
<% end %>

```

> [@akshayKhot](#):
>
> Also, the default visit action is `advance` ([source](https://turbo.hotwired.dev/handbook/drive#application-visits)), so you don’t have to specify it using the `data-turbo-action` attribute.

Niceeee. I didn’t know about this, thanks for point it out!.

---

<div class="post-metadata">

**Author:** ![turgs](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/turgs/32/1741_2.png) [@turgs](https://discuss.hotwired.dev/u/turgs)\
**Post date:** [April 30, 2023, 2:01am UTC](https://discuss.hotwired.dev/t/turbo-frame-with-an-advance-action-does-not-replace-page-title/3982/4 "2023-04-30T02:01:49Z")

</div>

I’m having the same trouble 😢 Really wish this was possible. Here’s [another example](https://discuss.hotwired.dev/t/how-do-you-update-a-pages-title-meta-description-open-graph-and-other-head-tags-when-using-turbo-frames-with-advance/4857/3)
