vueuse/head

Noscript still seems to not be working

Closed this issue · 1 comments

Implementing the noscript as commented here does not seem to be loading the iframe properly

Loading on the standard way, we can see the source and the network requesting the content

standard_html

standard_network

standard_source

When using the:

useHead({
        noscript: [
          {
            children: `<iframe src="https://www.googletagmanager.com/ns.html?${serialize(params)}" height="0" width="0" style="display:none;visibility:hidden"></iframe>`,
            tagPosition: 'bodyOpen'
          }
        ]
      })

Besides seeing the iframe being loaded as a string, we don't see any network activity at all

usehead_html

usehead_network

usehead_source

I have added a stackblitz to show this is not working properly.
I'm loading both iframes, but I can only find the first one as a real element
https://stackblitz.com/edit/nuxt-starter-v3etsl?file=app.vue

I tried your reproduction, it looks like it loads correctly when you disable javascript?

image

Not sure why you're trying to test it using scripts 🙃. If you can provide a reproduction where it doesn't work with scripts disabled I'm happy to investigate further.