No “Same-Origin” Restrictions

By default, all browsers enforce what is called ” Same-Origin Policy “. This means that a web page cannot access resources from another website. To bypass this restriction, there are several mechanisms (like CORS ), but all of them imply that the other website must allow this cross-origin communication.

In Yodeck Widgets, the “Same-Origin Policy” is disabled. The Widget loads up from the Player’s local storage, but can communicate with any web server on the Internet. This can be very useful, especially in case you want to retrieve data from a web site or web service where you would normally not be able to do so.

Example Usage

Public IP Widget

Let’s say that you want to create a Widget that shows the public IP address used by the Player when accessing the Internet.

Normally, this would require you to setup a web server doing just that. But there are several websites on the Internet providing this information. Normally, your Widget would not be able to access a website like that. But since the Widget has no Same-Origin Policy restrictions, this now works.

Use the following URL for your “Public IP” Widget:

Display Public IP (sample Widget)

Simple Weather Widget

Let’s say that you want to create a Widget that shows a Simple Weather Widget.

Use the following URL for your “Simple Weather” Widget:

Local Weather (sample Widget)