Skip to content

Viewport argument value “device-width;” for key “width” is invalid, and has been ignored. Note that

I am getting this error in JavaScript:

Viewport argument value “device-width;” for key “width” is invalid, and has been ignored. Note that ‘;’ is not a separator in viewport values. The list should be comma-separated.

How do I fix this?

Answer

I had this same error. Oddly, it’s quite simple to fix. Just change the semicolons for commas, like in:

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes">