How does someone create temporary URLs that point to Firebase data, but the data (and URLs) will be destroyed after a specific time, i.e., 5 minutes or 15 minutes?
Depending on exactly how the data is being stored, there are a few different options for removing the data by timestamp.
Assuming the data is unsorted, and you have stored the timestamp as a field in each record, then you may simply begin reading from the first record and deleting them until you find one you want to keep:
If the data is sorted by timestamp, you can retrieve and delete them as follows:
var FB = new Firebase(YOUR_URL);
var childRef = FB.child( TABLE_WITH_RECORDS_TO_DELETE );
var oneWeekAgoMinusOne = new Date().getTime()-1000*60*60*24*7-1; // one week ago
// fetched using endAt, so only retrieving older than 1 week
childRef.endAt( oneWeekAgoMinusOne ).on('childAdded', function(snapshot) {
// delete the record
snapshot.ref().remove();
});