Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7411323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:22:12+00:00 2026-05-29T06:22:12+00:00

while using document cookie <script typ=text/javascript> document.domain=example.com; </script> I got an error.i don’t know

  • 0

while using document cookie

<script typ="text/javascript"> 
        document.domain="example.com"; 
</script>

I got an error.i don’t know the exact problem.

Error: uncaught exception: [Exception… “Illegal document.domain
value” code: “1009” nsresult: “0x805303f1
(NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN)” location: “”]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:22:13+00:00Added an answer on May 29, 2026 at 6:22 am

    According to the HTML spec, document.domain is read-only. However, Firefox allows setting it to a superdomain:

    https://developer.mozilla.org/en/document.domain

    In the DOM HTML specification, this property is listed as being
    read-only. However, Mozilla will let you set it to a superdomain of
    the current value, constrained by its base domain. For example, on
    developer.mozilla.org it is possible to set it to “mozilla.org” but
    not “mozilla.com” or “org”.

    The error you’re getting clearly states that you’re making an illegal domain assignment.

    You mention cookies in your question. If you’re trying to set the domain part of a cookie, setting document.domain has nothing to do with it. You need to provide a domain parameter as part of the cookie string that you’re assigning:

    document.cookie = "foo=bar;domain=example.com";
    

    More info here: https://developer.mozilla.org/en/DOM/document.cookie

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In primefaces 3.0.M3, While using document.getElementById('confirmPassword') for getting textBox value to javaScript, which gives
I'm getting the following error while validating an xml document while using IXMLDOMDocument2 (C++):
I am using document.getElementsByTagName(input) to get all the input elements in my form.While iterating
is there a way to export only specified fields in a sub-document while using
I need help how to use correctly the javascript : document.cookie or how to
I've got a little problem while using jQuery validation plugin in on my .net/MVC
While using Struts2, I am using several annotations to do my validations inside the
While using Vim (at home and at work), I often find myself doing similar
While using regex to help solve a problem in the Python Challenge , I
While using the vector why do we sometime use the operator[] like homework[mid] but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.