Google Changes Search to Favor Mobile Friendly Sites

On Tuesday, April 22 2015, Google is changing its mobile search algorithm to favor sites that look good on smartphones, a move some are calling “Mobilegeddon”.

This affects searches done from mobile devices only. Desktop search results will not be affected.

This could be bad news for 40% of the top websites that are not mobile friendly, causing them to rank lower in search results.

You can test a website to see if a website is mobile-friendly with this Google test site: https://www.google.com/webmasters/tools/mobile-friendly/

Google also gives priority to pages that load fast. Building a mobile friendly website that loads fast is a must for businesses to be competitive. Contact us, the mobile web experts, to find out how you can improve your website to be mobile-friendly and fast.

Test your web browser for WebSocket support

Google announced an improved way for a web application to communicate with a server. The new method is called WebSockets. You can read more info here on WebSockets.

Here is a quick test to see if your web browser supports WebSockets. At the time this post was published Google Chrome developer channel release 4.0.249.0 is the only browser to support WebSockets.

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()
    //  {
    //    // WebSocket 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!\r\n\r\nBrowser: " + navigator.userAgent + "\r\n\r\ntest by jimbergman.net (based on Google sample code)");
  }
  else
  {
    // the browser doesn't support WebSockets
    alert("WebSockets NOT supported here!\r\n\r\nBrowser: " + navigator.userAgent + "\r\n\r\ntest 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>

You can find more information on WebSocket at the Mozilla Developer Network.


UPDATE May 4th, 2012:


Updated to report browser data using navigator.userAgent.
The previous version of this script used browser data from navigator.appName and navigator.appVersion, which are not consistent in different browsers (mainly Firefox).


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

Creative Commons License
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.

Adding Costco Gas Stations to Google Maps

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.

Creative Commons License
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.