Solving Pusher HTTPS Issue

If you use Pusher then you might face following error. The error happens when you try to use Pusher client library from https.

The page at 'https://shekhargulati.com/blog/1#/' was loaded over HTTPS, but ran insecure content from 'http://js.pusher.com/2.1/pusher.min.js': this content should also be loaded over HTTPS.

To fix this error, you should use Pusher Cloudfront CDN version as shown below. In your HTML or other template use following. Replace 2.1 with your own version.

<script src="//d3dy5gmtp8yhk7.cloudfront.net/2.1/pusher.min.js" type="text/javascript"></script>
Advertisements

How To Build Real-Time Location-Aware Applications using MongoDB , WebSockets , and HTML 5 GeoLocation API

One of the advantages of OpenShift or any other Platform as a Service is that it gives developers the power to turn their ideas into applications. As a developer, you are only concerned about writing code and the platform manages and scales the underlying infrastructure for you. I am also a developer and I love to write code.

A few days ago, I came up with a very simple idea to show messages in real-time on a map. A user posts a message via the application user interface, the application captures the user’s current location using an HTML5 Geo-location API, and then displays the message on a map. If another user posts a message from some other part of world, the first user will see that same message in real-time. As users start posting messages, they will see all of the messages appearing on the map.

Read full post at https://www.openshift.com/blogs/how-to-build-real-time-location-aware-applications