Why xmlhttprequest not allow request cross domain

Discussion in 'JavaScript' started by 2mk_atspace, Mar 4, 2008.

  1. #1
    Why xmlhttprequest not allow request cross domain, is there any security reason ?
     
    2mk_atspace, Mar 4, 2008 IP
  2. roy.laurie

    roy.laurie Peon

    Messages:
    51
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    FF and IE limit it for security reasons, yes.
     
    roy.laurie, Mar 4, 2008 IP
  3. in2clearsky

    in2clearsky Peon

    Messages:
    121
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Security reason i guess. They only allow same domain access.
     
    in2clearsky, Mar 5, 2008 IP
  4. Morishani

    Morishani Peon

    Messages:
    239
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yepe, security reasons.

    You can bypass it with PHP and fopen.
    (fopen to the requested URL and echo it back to the httprequest)
     
    Morishani, Mar 5, 2008 IP
  5. 2mk_atspace

    2mk_atspace Well-Known Member

    Messages:
    317
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #5
    Can you explain more detail ?
     
    2mk_atspace, Mar 6, 2008 IP