Tag Archives: W3C

Using CORS

via Using CORS – HTML5 Rocks.

APIs are the threads that let you stitch together a rich web experience. But this experience has a hard time translating to the browser, where the options for cross-domain requests are limited to techniques like JSON-P (which has limited use due to security concerns) or setting up a custom proxy (which can be a pain to set up and maintain).

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.

The use-case for CORS is simple. Imagine the site alice.com has some data that the site bob.com wants to access. This type of request traditionally wouldn’t be allowed under the browser’s same origin policy. However, by supporting CORS requests, alice.com can add a few special response headers that allows bob.com to access the data.

As you can see from this example, CORS support requires coordination between both the server and client. Luckily, if you are a client-side developer you are shielded from most of these details. The rest of this article shows how clients can make cross-origin requests, and how servers can configure themselves to support CORS.

Understanding Web Notification API’s

via Understanding Web Notification API’s.

Web Notification API allows websites to alert/notifications users outside the context of a web page, This allows web app’s to send information to a user even if the application is idle, which is really handy for an e-mail application that works on a web browser.

Web Notifications are sent using by a W3C standard and triggered locally by JavaScript. W3C standard does not specify how a user agent should display these notifications, so the interpretation of these messages depends on the device where the user agent is run. Notification normally appears in the following ways

  • A corner of the user’s display ( common )
  • The Home screen on a mobile device.
  • Notification Center on Mobile Phones.Android and Firefox OS

Free automatic prefixes Prefix CSS3

via Free automatic prefixes Prefix CSS3 • Addict Code.

CSS3 in many cases is somewhat annoying and that is because the prefixes of different browsers that do not agree to comply only with the standard of the W3C . There are several that are not difficult to learn, are tedious to write and take away time that could be spent on other things, but as the slogan says Prefix Free “Break free from CSS prefix hell!” .