Cross-Origin Resource Sharing (CORS) is a W3C spec that allows cross-domain communication from the browser. By building on top of the XMLHttpRequest object, CORS allows developers to work with the same idioms as same-domain requests.
Simple PHP Proxy: JavaScript finally “gets” cross-domain!
Of course, it’s often not that easy. Sometimes, your JavaScript needs to access cross-domain HTML, XML or JSON data that’s just not available in JSONP format. In this case, what do you do? Well, you can ask the people controlling the remote data to provide it in JSONP format, but that probably won’t happen (at least not anytime soon).
Joel: Human Task Switches Considered Harmful
On the individual level — have you ever noticed that you can assign one job to one person, and they’ll do a great job, but if you assign twojobs to that person, they won’t really get anything done? They’ll either do one job well and neglect the other, or they’ll do both jobs so slowly you feel like slugs have more zip. That’s because programming tasks take so long to task switch. I feel like when I have two programming projects on my plate at once, the task switch time is something like 6 hours. In an 8-hour day, that means multitasking reduces my productivity to 2 hours per day. Pretty dismal.
As it turns out, if you give somebody two things to work on, you should be grateful if they “starve” one task and only work on one, because they’re going to get more stuff done and finish the average task sooner. In fact, the real lesson from all this is that you should never let people work on more than one thing at once. Make sure they know what it is. Good managers see their responsibility as removing obstacles so that people can focus on one thing and really get it done.
Encoding Parts of Strings
You should never be shoving strings together like this without escaping their components first.