Just out of curiosity, what could be the root of having conventions as log-out/ close button on top right for windows and top left for macs and same being followed on websites?
For most people (i.e. those who are right handed) the top right corner is most logical for close / logout.
When you read from left to right, and you are right handed, you hold the book in your left hand and go to the top right corner with your hand to turn (leave) the page.
Lefties tend to be more arty / creative, so perhaps the designers at apple were thinking left handedly?
It's UX site... someone's got to mention Fitts' Law and the infinite edge.* http://bit.ly/1tvsWxq
Corners are an especially easy place to click as you can just whack your mouse vaguely top-right and you'll end up over the right spot. And seeing as top left was taken up with the Window title top right is what's left.**
*UX band name anyone?
** on Windows at least you can also double click top left to close a window.
If you see the Xerox Star (First GUI ever created) you'll see that they use icons for window handling (as well as document commands) in the titlebar, in both corners.
I think the decision of right vs left is more arbitrary than we would like to think. We all follow this basic design patterns. Logically, you want to find an unobtrusive spot that is equally easy to access to harbor this type of commands.
I think Fitt's law doesn't benefit right or left, because it all depends on the position of your cursor at the time you feel the need to access this controls.
Well generally I'd say because in these positions they don't take up important space for content. Top left or right are the positions where the eye starts to recognize and then it moves downwards for more content. Since logout/close buttons call actions which are not that important and so to say finish the current dialogue or page, they were put up there so that you don't accidently click/tap/swipe them. Another reason is, that a lot of webpages have been using these positions for a long time so it's learned by the user. I know a few websites which put the buttons elsewhere and that really confused me and I had to search where this button is to log out from my online banking :)