JQuery error for mobile in javascript google console

I am creating a jquery mobile site and I have an error. In my googlejavascript interface error, I get this error

Viewport argument value "device-width;" for key "width" not recognized. Content ignored. 

I don't know how it can be, since I don't know anything about javascript

what could be? What does it mean?

+4
source share
3 answers

Device Width works only for mobile devices. If you test most regular desktop browsers, they won’t know how to handle this. However, there will be no harm, but they simply ignore it and note on the console - nothing that will bother ordinary users.

(You can also receive similar messages if you use orientation: portrait or orientation: special landscape styles or meta tags)

+2
source

According to this page , the viewport meta tag syntax is incorrect.

Even if the iPad doesn't complain about it, it should be

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

And not

 <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;" /> 

Note the colon instead of semicolons

+3
source

That really means little. Basically this is more of a mistake, because the browser does not know how to process code intended for another device. So he is worried and gives an error, although he just the browser does not understand what this means.

0
source

Source: https://habr.com/ru/post/1396527/


All Articles