Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Suppress console message when attempting to set cookie for an invalid domain

  • No replies
  • 0 have this problem
  • 8 views
more options

We write an SDK that needs to detect what subdomain a site is running on. For example to detect that app.foo.example.com.au and web.foo.example.com.au share example.com.au

In order to do that we check if we can set a cookie on `.au` that fails. Then `.com.au` also fails, then `example.com.au` and that succeeds

This is safe and fast and leaks no information not already available to any JS running in the page.

In most browsers this is fine. In Firefox it is also fine _except_ it logs a warning to the console that a cookie was rejected. This then causes users to open a support ticket with us in order to find out about "the error"

Is it possible for us to suppress this log?

We write an SDK that needs to detect what subdomain a site is running on. For example to detect that app.foo.example.com.au and web.foo.example.com.au share example.com.au In order to do that we check if we can set a cookie on `.au` that fails. Then `.com.au` also fails, then `example.com.au` and that succeeds This is safe and fast and leaks no information not already available to any JS running in the page. In most browsers this is fine. In Firefox it is also fine _except_ it logs a warning to the console that a cookie was rejected. This then causes users to open a support ticket with us in order to find out about "the error" Is it possible for us to suppress this log?
Attached screenshots

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.