Turbo frame with an advance action does not replace page title

Hi.

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

<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.

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), so you don’t have to specify it using the data-turbo-action attribute.

I hope that helps.

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.

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!

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

<% 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 %>

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