Hi Dirk,
here are two approaches that have worked for us.
First, you could give the meta tag an `[up-hungry]` attribute. This way, if a matching meta tag appears in a response, it is updated in the current page, even if it wasn't targeted:
<meta name="description" content="..." up-hungry />
Unpoly is able to derive a target selector for this element because it has a `[name]` attribute. If you have something else, like a `link[rel=canonical]` you may need to give it an `[id]` attribute so an unambiguous selector can be derived.
We're using a different approach in an application that (for performance reasons) doesn't render a <head> for fragment updates. In this case we would attach the new meta description to the main content area of the page:
<main meta-description="...">
...
</main>
A compiler would pick up that attribute and transfer it to a meta tag in the <head>:
up.compiler('[meta-description]', function(element) {
let metaTag = document.querySelector('meta[name=description]')
let newDescription = element.getAttribute('meta-description')
metaTag.setAttribute('content', newDescription)
})
Best regards
Henning