I was asked a question below and cannot find the answer. I looked up similar posts, but many posts (like this) ended up talking about cross-origin, not cross-domain. What is the answer to the below question?
Q: Assume you are working on a webpage at http://example.com/path/to/foo.html. if you were to send an AJAX request to the following URLs, which one would NOT trigger a cross-domain violation?
A: http://example.com/bar
B: https://example.com/path/to/bar.html
C: https://example.com:80/bar
D: http://www.example.com/bar
E: C and D
Thank you in advance.
UPDATE:
Originally, I came across a website saying there is a 'Cross-domain violation' which is different from 'CORS' since 'origin' and 'domain' points different part.
That's why I have been looking for the definition of 'cross-domain violation'
. But it was actually the same as 'same-origin policy', as the answer below shows.