Posted by Jim Bergman on December 22, 2010 at 1:46 am
Android 2.3 Gingerbread beta was recently released to developers.
The Android 2.3 SDK information does not mention a browser upgrade or support for websockets specifically. So there is no official word from Google regarding websockets being included when Android 2.3 is released.
Taking a look at the beta 1 release of the Android 2.3 SDK, the browser in the emulator is the same version as in Android 2.2 FroYo. Here are screencaps from the browser in the Android 2.3 emulator and a screencap from the browser in Android 2.2. Note the browser version is the same in each screencap.
Considering that the browser in Android is based on the same open-source WebKit browser used in the iPhone and iPad, and Apple recently released websocket support in iOS 4.2, it is reasonable to predict that Google will include websocket support in the Android browser very soon, and hopefully in Android 2.3.
I posted this question to Quora. We’ll see if someone with more info can add to this.


Android 2.3 ‘Gingerbread’ WebSocket support by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.
Continue Reading
Posted by Jim Bergman on November 26, 2010 at 12:50 am
Apple released iOS 4.2 in November 2010, and part of that release was support for websocket in the web browser.
This was confirmed in a visit to a local Apple store. Here are some screencaps grabbed of the iPhone 4:
iOS 4.2 is also available for the iPad, which is a huge improvement. iOS 4.0 was only for the iPhone, and the iPad was still using iOS 3. Here are the iPad screencaps to confirm websocket support on the iPad:
Apple had websocket support in the beta of iOS 4.0, but removed it before release. Whatever reason it was not included iOS 4.0 must have been resolved in iOS 4.2.


WebSockets supported in iOS 4.2 by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.
Continue Reading
Posted by Jim Bergman on April 26, 2010 at 1:58 am
UPDATE December 2010: iOS 4.2 now has websocket support
UPDATE July 2010: since the beta 2 release of iOS4, Apple has disabled websockets support. A few readers pointed this out, so I made a trip to an Apple Store it run a few tests.

Confirmed: iOS4 as it is released reports it does NOT have websocket support.
ORIGINAL POST:
Since the Safari web browser on the iPhone is based on WebKit, it makes sense that at some point support for WebSockets would make it to the iPhone.
Safari on iPhone OS 4.0 beta 2 supports WebSocket.

Once OS 4 is available for the iPad, support should be there as well.
Thanks to reader Arun for pointing this out.


WebSockets NOT supported in iOS 4.0 by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.
Continue Reading
Posted by Jim Bergman on December 9, 2009 at 6:34 pm
Google announced an improved way for a web application to communicate with a server. The new method is called Web Sockets. You can read more info here on Web Sockets.
Here is a quick test to see if your web browser supports Web Sockets. At the time this post was published Google Chrome developer channel release 4.0.249.0 is the only browser to support Web Sockets.
Here is the JavaScript code (or right click and save file as WebSocketTest.js):
function WebSocketTest()
{
if ("WebSocket" in window)
{
// Google example code
// var ws = new WebSocket("ws://example.com/service");
// ws.onopen = function()
// {
// // Web Socket is connected. You can send data by send() method
// ws.send("message to send"); ....
// };
// ws.onmessage = function (evt) { var received_msg = evt.data; ... };
// ws.onclose = function() { // websocket is closed. };
alert("WebSockets supported here!rnrnBrowser: " + navigator.appName + " " + navigator.appVersion + "rnrntest by jimbergman.net (based on Google sample code)");
}
else
{
// the browser doesn't support WebSockets
alert("WebSockets NOT supported here!rnrnBrowser: " + navigator.appName + " " + navigator.appVersion + "rnrntest by jimbergman.net (based on Google sample code)");
}
}
Sample HTML code (save file as WebSocketTest.html in same folder as .js file above):
<html>
<head>
<title>JimBergman.net - JavaScript: WebSocketTest</title>
<script type="text/javascript" src="WebSocketTest.js"></script>
</head>
<body bgcolor="#FFFFFF">
<a href="javascript:WebSocketTest()">Run WebSocket test</a>
</body>
</html>
UPDATE:
Result of this test on an Windows 7 PC in Google Chrome v4.0.249.0

Result of this test on an Windows 7 PC in Mozilla Firefox v3.5.5

Result of this test on an Windows 7 PC in Microsoft Internet Explorer v8.0.7100.0

Result of this test on an Apple iPhone in OS 3.1.2



Test your web browser for WebSocket support by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.
Continue Reading
Posted by Jim Bergman on September 22, 2008 at 2:37 am
How many time have you gone to search for something on the Internet, and it just wasn’t there?
Many times travelling over the last few years, I’ve wanted to know where there was a Costco gas station along my route. Their gas prices are usually the most competitive in a particular area. Finding a location along your route is hard to do when all you have is a list sorted alphabetically by State and City.
So I took the PDF of Costco Gas Stations from the Costco website, extracted it, massaged the data to import it into a database, converted it into KML, and added it to Google Maps.
View Larger Map
I discovered after importing the data, that Google Maps paginates your data set after 200 entries. Since the original data was sorted by State and the City, all the locations are not shown at once. There are 300 Costco Gas Stations in the list.
A more useful arrangement would be to sort the data by ZIP code, and break it into two sets: East and West. I’ll try to find some time for that in the next week.
There were some data validation problems with the original data set also, mainly having to do with non-plain text characters in the data. For example, 1001 Boul. Jean-Baptiste-Rolland, Saint-Jérôme, Quebec J7Y 4Y7 failed validation. The é and ô had to be changed to e and o.
Disclaimer: I was not asked by Costco to do this, and have no ties other than a common membership.
In what way could this map be improved? Leave your suggestions in the comments.


Adding Costco Gas Stations to Google Maps by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.
Continue Reading