New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 332794 link

Starred by 4 users

Issue metadata

Status: Fixed
Last visit > 30 days ago
Closed: Jan 2014
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Sign in to add a comment

Unknown data in <meta name="viewport" content=""> content attribute triggers console errors

Reported by, Jan 9 2014

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

Steps to reproduce the problem:
1. Create a webpage, like <!doctype html><title>foo</title><meta name="viewport" content="width=device-width">
2. Add an unknown value (to Chrome) in the content attribute, like minimum-ui: content="width=device-width,minimum-ui"
3. Reload the page, an error shows up in DevTools

What is the expected behavior?
No errors in the DevTools console.

What went wrong?
Error in DevTools console, but nothing is broken.

Did this work before? N/A 

Chrome version: 31.0.1650.63  Channel: stable
OS Version: OS X 10.9.1
Flash Version: Shockwave Flash 11.9 r900

There are two ways that would work much better:

1) silently ignore the value; or
2) trigger a console warning (not an error).

From what I can tell from the specification, there are no requirements to hint to the developer that a value couldn't be recognised. However, there could be value for the developer to know when a recognised _key_ inside a content attribute has an invalid value (like content="width=foo").

The specification I looked at was:
Status: WontFix
Chrome does not know these properties, hence it does not know if it renders everything properly. Hence that is an error.

Comment 2 by, Jan 9 2014

So it _assumes_ it's an error instead of a warning? I don't necessarily agree with that.

There are lots of other things the browser gracefully "recover" from without notifying the user/developer.
A little background on what motivated this ticket:

iOS added a minimal-ui viewport attribute. It's unspecified unfortunately.


Outside of this ticket, here's some concern on the forums about our errors:

We need to take console spam seriously. It muddies the experience of using the devtools. And while the rest of Chrome can spit into the console, we own the experience.

This situation here is equivalent to the CSS warnings we had barfing on syntax hacks. We either need to loosen the strictness of the viewport validation or remove it.
Status: Assigned
Thanks for the broader context, Paul. Do you think won't be able to manage it and we should mute it altogether (as with CSS), or we could whitelist compatibility attributes only?
There are no tooling for the meta tags and I have seen people write the arguments wrong multiple times so I think the warnings are useful.

That said, I think we should not warn for known (even if unsupported) tags
Status: Fixed
"minimal-ui" is ignored, other errors have been turned into warnings.

Project Member

Comment 7 by, Jan 10 2014

The following revision refers to this bug:

r164872 | | 2014-01-10T13:14:41.961789Z

Changed paths:

Reduce viewport arguments parsing noise in the DevTools console

The "minimal-ui" argument is ignored, the other parsing errors
have been transformed into warnings.,
BUG= 332794 

Review URL:
Looks good, guys.

error->warning is ideal. And I like keeping the viewport warnings in general. It helps.


Sign in to add a comment