Computer Science Homework Help

Gomal University Same Origin Policy Preventing XXS Attacks Questions

I’m working on a computer science question and need guidance to help me learn.

1) Do a bit of research on JSON and AJAX.

How do they relate to the the Same-Origin policy? 

2)Use the Web to search for methods to prevent XSS attacks.

Write a brief description of more than one method