Fixing "Viewport argument value" error in webkit's console

Fixing "Viewport argument value" error in webkit's console

I've been doing a lot of web development for mobile devices lately, and while I've been using chrome's developer tools, I keep getting annoying error messages in the console like this...

Viewport argument value "1;" for key "initial-scale" was truncated to its numeric prefix. 

The culprit here is my viewport meta tag. Mine looked like this...

<meta name="viewport" content="width=device-width;
     height=device-height; initial-scale=1; maximum-scale=1; user-scalable=0;">

Which looks correct at first glance, I probably copy and pasted it from another website somewhere. But if you examine webkit's documentation, you'll notice that the separators are supposed to be commas, not semi-colons. I fixed the separators so my meta tag looks like this now...

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

And problem solved, my console log is nice and quiet now.

Post A Twitter Response To This Blog Post

To: @mattccrampton

0