Anyone have experience with Firebase + IE8?

679 views
Skip to first unread message

Jonathan Kim

unread,
Mar 13, 2014, 1:58:53 PM3/13/14
to fireba...@googlegroups.com
I have an embed script that makes requests directly to Firebase from different clients. Works great in modern browsers, but IE has terrible support for CORS. Anyone happen to find a workaround?

I can hack around the fact that certain versions of IE only support GET/POST methods, but one big limitation is that the protocols must match in order to make a request. This is problematic, since Firebase only allows https connections.

Any ideas?

Michael Lehenbauer

unread,
Mar 13, 2014, 2:09:03 PM3/13/14
to fireba...@googlegroups.com
Can you elaborate on what you're trying to accomplish?  In general, just using the Firebase JavaScript SDK directly from IE8 should work fine and doesn't run into issues with CORS, etc.  So I'd use it instead of the REST api if it's an option.

-Michael


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonathan Kim

unread,
Mar 13, 2014, 4:21:10 PM3/13/14
to fireba...@googlegroups.com
I'm doing basic $.ajax requests using GET, POST, PUT and PATCH methods. Unfortunately, the Firebase SDK is too large to include, especially since I just need to make unauth'd requests. I'm getting Access Denied errors, a la http://stackoverflow.com/questions/5087549/access-denied-to-jquery-script-on-ie

This isn't exactly a Firebase bug, but just curious if anyone else has worked around this...

Rob DiMarco

unread,
Mar 13, 2014, 4:49:51 PM3/13/14
to fireba...@googlegroups.com
Hi Jonathan -

If you're committed to using the REST API but need to support the full breadth of HTTP methods in older browsers, try setting the 'X-HTTP-Method-Override' header on the request. With that header, you can make a request that is actually a GET but our server will treat as a PUT / POST / DELETE (whatever method you specify in that header).

In jQuery this would look something like:

$.ajax({
  type: 'GET'
  headers: {
    'X-HTTP-Method-Override': 'PUT'
  },
  ...
});

Hope that helps. Thanks -

Rob DiMarco
Engineer @ Firebase

Jonathan Kim

unread,
Mar 19, 2014, 12:53:12 PM3/19/14
to fireba...@googlegroups.com
Thanks for the point about the headers, Rob. However, it's actually not possible to send custom headers with cross-origin requests in IE8/9. It's not supported by either XDomainRequest or JSONP (kudos that you support JSONP btw). Since I'm trying to update data at an existing location, I can't simply use POST.

Any chance you guys have a proxy file setup somewhere on a .firebaseio.com domain?
Reply all
Reply to author
Forward
0 new messages