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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:11:46+00:00 2026-06-18T01:11:46+00:00

OK, so I have a domain at affiliatedomain.com, which is really just an affiliate

  • 0

OK, so I have a domain at affiliatedomain.com, which is really just an affiliate version of my main website maindomain.com.

We have a requirement to set the maindomain.com cookies on the users browser upon their first visit to affiliatedomain.com. This is currently achieved by a server side 302 redirect to maindomain.com/addcookie?redirect=affiliatedomain.com which then does a 301 redirect back to affiliatedomain.com.

This is obviously not ideal for a few reasons, a) because it performs unnecessary client redirects, and b) it leaves maindomain.com open for url redirecting security vulnerabilities.

I’ve looked into achieving this through XHR by just performing a javascript GET on maindomain.com, but this requires Access-Control-Allow-Origin to be switched on, which isn’t supported by all versions of IE (we need to support IE6 and 7).

Therefore is there any way to achieve this requirement? I’ve looked into JSONP but not too sure how I can implement it using this method.

  • 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-18T01:11:47+00:00Added an answer on June 18, 2026 at 1:11 am

    I’ve found a way to do this. I’ve set up a controller action on maindomain.com to return an ActionResult of type JavaScript() with endpoint maindomain.com/setcookie.mvc. Then from affiliatedomain.com I added a tag pointing at this endpoint.

    The client will then perform a GET to the setcookie.mvc page (since the same domain policy doesn’t apply to tags), and this will in turn allow me to perform any server-side cookie logic I require.

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

Sidebar

Related Questions

If I have domain name example.com , and if I set an A record
I have domain mydomain.com (my website) I have partner link partnerlink.com/something?partnerId (thirdparty provider) Partner
I have domain.com and redirected it to domain2.com (which is in a different server)
I have domain site.com and there is subdomain sub.site.com Once you open sub.site.com you
I have a domain with wildcard - *.mysite.com hosted on Server1 I am planning
I have a domain with host www.mydomainhost.com . Now i got another domain named
I have domain like www.abc.in and would like to buy www.abc.com . As everyone
I have a website on Domain A that has a page with an html
I would like to have domain.com using asp.net mvc2 technology and domain.com/blog would use
I have domain.com and domain.org as aliases pointing to the same vhost. How can

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.