Until now my understanding of its semantics is:
- A client downloads javascript code MyCode.js from http://siteA - the origin.
- The response header of MyCode.js contains Access-Control-Allow-Origin: http://siteB, I thought it can cross-origin references with the other site.
I referred to Cross-origin resource sharing and understood that all I knew was wrong, I studied other articles but still, I didn't understand how to use this header. How do I enable the javascript code downloaded from site A to access resources on site B using this header?