<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[History and document.title]]></title><description><![CDATA[<p dir="auto">I'm trying to programmatically change the document.title after the page was loaded – which does work – but if you open the quick history (click on the arrow in the address bar), the original, old, initial title still shows up where the new title should be. Meanwhile in Chrome, the same code does exactly what I want and show the updated titles, meaning that the code is fine but it's an Opera issue.</p>
<p dir="auto">Are there any workarounds you can think of?</p>
<p dir="auto">(I'm using Opera 12.16, btw)</p>
<pre><code>function update_title(){ if (  document  &amp;&amp;  document.title  &amp;&amp;  (document.title.toLowerCase() == "too generic")  )    { var better = "";   if ( better = $('h1:first').text() )     document.title = better;    }    }
</code></pre>
]]></description><link>https://forums.opera.com/topic/482/history-and-document-title</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 14:45:29 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/482.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Jan 2014 20:45:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to History and document.title on Fri, 10 Jan 2014 12:37:53 GMT]]></title><description><![CDATA[<p dir="auto">Hey yeah, that link did help. I needed to also call the replaceState() method like this:</p>
<pre><code>history.replaceState( {state:0}, better );
</code></pre>
<p dir="auto">… where {state:0} refers to the <em>data</em> that the doc is talking about, or the current document.</p>
<p dir="auto">Thanks a lot! <img src="https://forums.opera.com/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=f58hvca1lju" class="not-responsive emoji emoji-emoji-one emoji--winking_face" title=";^)" alt="😉" /></p>
]]></description><link>https://forums.opera.com/post/27168</link><guid isPermaLink="true">https://forums.opera.com/post/27168</guid><dc:creator><![CDATA[WoodrowShigeru]]></dc:creator><pubDate>Fri, 10 Jan 2014 12:37:53 GMT</pubDate></item></channel></rss>