I have a Firebase app that works perfectly on localhost, but does not work when I reach it externally (by allowing port forwarding in my router) or when I upload it to Bluehost.
This code works:
$(document).ready(function() {
$("#button").click(function() {
alert('Working!');
});
});
but this does not:
var firebaseRef = new Firebase('[my firebase url]');
$(document).ready(function() {
$("#button").click(function() {
alert('Working!');
});
});
After doing some research, I believe the problem to be the Same Origin Policy, since the Firebase JS include is
http://static.firebase.com/demo/firebase.js
but my firebase reference is on
http://gamma.firebase.com/
I've found a few ways to get around this but want to know the best way to handle it with Firebase (or if the Same Origin Policy is even the issue here).