Page HTML Header not working?

This seems pretty basic, but perhaps I’m misunderstanding. When I put the following in the Page HTML Header field of the property editor for the page…

<script>
    alert('Hey!');
</script>

…nothing happens when I view the page. I’ve tried it on several different pages with no effect. If I use a <style> element, it has no effect either. Am I missing something?

1 Like

Hey Steve,

Working in a vanilla page for me:

26%20PM

Maybe try loading in one of the safe modes to troubleshoot.

–Ken

Thanks for testing, @mebeingken. Will do.

Ken, just out of curiosity, did you try that on a free tier app or a paid plan?

Agency

Aha! Thanks, Ken! So here’s what I’ve learned…

I noticed the following under the SEO / metatags section of the app settings on the free tier:

(BTW, that should probably say “Personal plan or greater” or simply “paid plan”.) However, it apparently applies not only to app-level custom headers but also to page-level custom headers, because that same JS snippet works fine in both locations on a paid plan. What’s perplexing is that there’s no indication at the page level that it won’t work on a free plan. Why not just disable or hide the field altogether to avoid confusion?

Anyway, something does seem awry with custom headers inside a plugin element - specifically, they don’t work - not even if the plugin is used in an app on a paid plan. That seems like a bug. How can a plugin be properly developed and tested if parts of it don’t work? I suspect this post is referencing the same issue.

Unless someone has some insights on this issue, I’ll go ahead and report it as a bug.

8 Likes

This topic was automatically closed after 14 days. New replies are no longer allowed.