Use https for ajax sync. Make new doc with querystring uid if for some reason the URL points to a nonexistent doc.