How do you include a tag in the head of Meteor.js app at initial page load?
Asked Answered
R

2

6

In particular, I'd like to add

<meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1, initial-scale=1, minimum-scale=1">

and when I insert it into the head from JS, I'm still able to scroll horizontally on mobile browsers, so I'm guessing it needs to be in the head a load time.

Reticulation answered 24/6, 2014 at 18:53 Comment(5)
See answer for this : #19094372Zubkoff
Try chaing user-scalable to 0 instead of noFeatheredge
The other question refers to a supported method of dynamic head insertion, post-page load. I'm looking to add a static tag before page load. Changing "no" to "0" had no effect.Reticulation
What happens when you just put it inside <head> block?Resolutive
Strips off <head> (well, either Meteor or Chrome does that) and puts content in body.Reticulation
R
10

Place it in a <head> block outside of a <template> tag in any .html file.

Reticulation answered 2/7, 2014 at 17:16 Comment(0)
C
2

Try using inject-initial atmosphere package to have your meta tag present on the initial load.

Cascabel answered 24/6, 2014 at 21:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.