amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

How can i disable the Chrome's console developer output?

Open miguelcolomer opened this issue 11 years ago • 5 comments

Hi, i don't know if it's possible to disable the output to the Chrome developer's console or any browser... i don't know if this affects the performance and we can enable when we are making changes in the page and disable it when we publish the page for the rest of the people.

Thank you!

miguelcolomer avatar Oct 26 '15 00:10 miguelcolomer

Logging output is only on in dev mode. I.e. when you have a "development" attribute on script or a "development=1" hash argument. On Oct 25, 2015 5:10 PM, "miguelcolomer" [email protected] wrote:

Hi, i don't know if it's possible to disable the output to the Chrome developer's console or any browser... i don't know if this affects the performance and we can enable when we are making changes in the page and disable it when we publish the page for the rest of the people.

Thank you!

— Reply to this email directly or view it on GitHub https://github.com/ampproject/amphtml/issues/755.

You received this message because you are subscribed to the Google Groups "amphtml-eng-github" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/issues/755%40github.com https://groups.google.com/a/google.com/d/msgid/amphtml-eng-github/ampproject/amphtml/issues/755%40github.com?utm_medium=email&utm_source=footer .

You received this message because you are subscribed to the Google Groups "amphtml-eng" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/google.com/d/msgid/amphtml-eng/ampproject/amphtml/issues/755%40github.com https://groups.google.com/a/google.com/d/msgid/amphtml-eng/ampproject/amphtml/issues/755%40github.com?utm_medium=email&utm_source=footer .

amphtml-team avatar Oct 26 '15 00:10 amphtml-team

Yes, only in development mode will you get most of the logging. Development mode should be disabled for your final pages as it does have a negative performance impact, although somewhat minor.

Note that even in non-development mode, the AMP runtime will still log a little bit to the console, at a minumum, you'll see something like "Powered by AMP ⚡ HTML – Version 1445032534119"

Gregable avatar Oct 26 '15 18:10 Gregable

Ok, i have this message: "Powered by AMP ⚡ HTML – Version 1445032534119" and the errors or warnings (for example if i use amp-img without height or width values).

Is this the development mode?

I notice a little performance drop when i use amp-img or the adsense code (very little).

Thank You!

miguelcolomer avatar Oct 26 '15 22:10 miguelcolomer

You'll see the "Powered by AMP" message in development or not, but the errors/earnings that you mention mean you are in development mode.

You can trigger development mode in the browser in one of two ways. One is to append #development=true to your URL documented here. The other is to add the development attribute to your script tag, e.g: <script src="https://cdn.ampproject.org/v0.js" development></script> whose documentation was accidentally removed in a recent spec cleanup. I suspect you are doing this through the latter method.

Gregable avatar Oct 26 '15 22:10 Gregable

Amazing, yes i'm doing that. I'll continue applying amp changes to my blogger's blog. Thank you very much!

miguelcolomer avatar Oct 26 '15 22:10 miguelcolomer