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 8756455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:05:15+00:00 2026-06-13T14:05:15+00:00

If you visit a website at http://www.example.com/dir , then any ajax requests to http://example.com/dir/something.php

  • 0

If you visit a website at http://www.example.com/dir , then any ajax requests to http://example.com/dir/something.php (with the www missing) cause the following message to show up in google chrome’s console:

XMLHttpRequest cannot load http://example.com/dir/something.php.
Origin http://www.example.com is not allowed by Access-Control-Allow-Origin.

What’s up with this, and what can be done to fix this?

Edit: It seems that any cookies set by example.com also disappear when you visit http://www.example.com ?

  • 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-06-13T14:05:16+00:00Added an answer on June 13, 2026 at 2:05 pm

    www.example.com and example.com are different domains and they can serve different content. www.stackoverflow.com only redirects to stackoverflow.com but technically it can display a site full of ponies instead.

    See Origin determination rules – it actually uses the exact same example.com (nomen est omen!) as an example.

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

Sidebar

Related Questions

I have a website let's say www.example.com and I have a subdomain something.example.com Both
I actually have two websites on the same domain. say, for example http://www.abc.com/flashsite &
If you will notice when you visit... http://www.thebattleforarcadia.com/construction/index.html when you shrink the size of
My dilema: In .htaccess in my website's root: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
Visit this website. https://zapier.com/ See this portion of the website. I wan that same
I'm following the django tutorial at Django by example in http://www.lightbird.net/ . In the
I'm trying to speed up my site and found this site: http://www.computingunleashed.com/speed-up-wordpress-ultimate-guide-to-make-sites-super-fast.html , which
OK I have my website running Wordpress at http://www.visualise.ca/ and I installed the qTranslate
My website has an SSL cert (example url: https://subdomain.example.com ). Under Apache it's set
The article here :: http://www.microsoft.com/web/post/how-to-publish-a-web-application-using-webmatrix states that to publish via FTP I must enter

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.