Which solution is superior? Faye answers your question better, but Kaiser solves your problem better. At the end of the day, you're judging the answers by how they solve your problem, but you didn't ask how to solve your problem, you asked how to implement a specific method of solving the problem. This is an X Y question.
For example, I have a house, it has no doors or windows, so I ask on a DIY stack how to install hinges for steel doors. People answer, but I don't pick the answer that's best at installing steel door hinges, I pick the answer that solves the problem of my house having no doors or windows. This leads me to picking a detailed answer that sends me on a wild goose chase with a sub-optimal solution that doesn't really fix my house havng no doors or windows.
Sadly, I can't think of a way to phrase a question to solve your problem without it turning into a discussion, so we have to deal with what you asked.
This is why you have 2 answers, Kaisers question is not follow up information to extend and improve, it's an alternative solution with a different approach that solves the original problem.
So pick the answer that directly answers the question best, leave clarifying comments, ask questions about the answers you get, and watch for improvements and edits