Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8848425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:25:14+00:00 2026-06-14T12:25:14+00:00

The documentation for push led me to this little experiment: var FB = new

  • 0

The documentation for push led me to this little experiment:

var FB = new Firebase(MYURL);
var ref = FB.push({test: 'push'}, function() { console.log('callback completed'); });
console.log(ref.name());

I see that calling ref.name() immediately returns an ID even before the asynchronous callback is invoked. Does this mean that the ID is created on the client without consulting the server? I assume so, which raised a curiosity:

How would the server handle a conflict if two clients sent the same ID? Would the second overwrite the first?

I’m not assuming here that two clients would create clashing IDs, but rather that a malicious client might spoof an ID and overwrite existing records. Is this a valid concern I’ll need to watch out for when configuring rules for the upcoming security?

More importantly, I’m very curious to understand how IDs are getting created so I can ensure I use them properly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:25:15+00:00Added an answer on June 14, 2026 at 12:25 pm

    The ID’s created by push are created at the time push is called. We do this so that you can have a very responsive client that doesn’t have to wait for network latency, and also so your client can work in offline mode.

    The ID generating algorithm is based on timestamp (so that the ID’s remain in order) and a random suffix (there’s a bit more to it than that, but that’s the basics). The algorithm is designed so that no two non-malicious clients will ever choose the same key in our lifetimes (or even in millions of years).

    Malicious clients could overwrite others’ ID’s if no security is enforced (though they would have a tough time guessing the IDs that were going to be generated by other clients beforehand), and yes you’ll need to provide security protection to these locations if you want to prevent that. I don’t think “push()” IDs have any unique security needs that the other locations don’t though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read the Apple Push Notification documentation and it seems this isn't possible but
I am new to this topic and require some guidance in implementing Apple Push
While searching for some functions in C++ standard library documentation I read that push
I have read the Blackberry documentation and it is possible to push a notification
There's something I'm not seeing with Apple's push notification programming guide & related documentation.
How can push a URI like this in CodeIgniter (1.7.1 currently): example.com/seg1/seg2/seg3/seg4/ or example.com/seg1/seg2/
We have implemented PushSharp for sending push notifications to our enterprise iOS devices. This
I'm trying to send a push notification to APNs using Erlang. This is the
I'm interesting in creation of PushCertWebRequest (this is from apple documentation) I have found
I'm sure this is covered in the documentation somewhere but I have been unable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.