I see many websites put banners on top of their website telling you they want to store cookies on your machine. I don't understand why they would do this, is it a law? I read on wikipedea that the "European Union" passed some law about this here, do I only have to follow the law if my website is being hosted there? if I own a website, should I put a banner a the top also?
Questions on Super User are expected to relate to computer software or computer hardware within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
There is no technical requirement that would require this type of banner to be displayed. The only requirements that might drive this type of UI decision are:
For those wondering, you can see an example of the kind of "banner" the querant is talking about on a very prominent and legitimate website, such as Ubuntu.com.
Despite having provided all of this information, I don't think it is extremely topical to SuperUser to discuss the legal obligations of website owners, so my answer will not provide a detailed account of which jurisdictions may require this, or other details about law. As they say, "IANAL" (I am not a lawyer).