Obtained from another JS server


  • QA Engineer

    Hello! The question is: it is allowed from another site on the reference www.example.com/example to hand over the object {x":3}. Can't you get this object by using javascripts without copying and playing with boobs? Why would I just walk through the reference and see this object quietly, but I can't pull it in my script and work with him? I feel like I don't understand anything.

    I tried that:

    var x = new XMLHttpRequest();
    x.open('GET', 'https://example.com/example');
    alert( x.responseText );

    How much am I far from the truth?



  • https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B0%D0%B2%D0%B8%D0%BB%D0%BE_%D0%BE%D0%B3%D1%80%D0%B0%D0%BD%D0%B8%D1%87%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD%D0%B0 ♪
    For safety reasons.
    A good solution is contained in the article recommended by @MasterAlex - https://ru.wikipedia.org/wiki/Cross-origin_resource_sharing ♪
    Limits don't let anyone touch your code and do shit or even break.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2