Is using gerund with relative pronoun possible? [duplicate]

I would like to ask about two things

  1. Can both "while" and "when" be used with a gerund?
  2. Which one sounds better: "While ordering" or "when ordering" ?

    • While ordering a taxi, reliability is very important

    • When ordering a taxi, reliability is very important

    • When you order a taxi, reliability is very important


I believe Hugh is quite right to question the taxonomy here as gerunds. Rather, they should be treated as dangling participles (no subject for "ordering") or as a strained ellipsis ("When [one is] ordering a taxi, etc.").

As for the difference between "when" and "while, I'd say that depends very much on context. If the statement is "gnomic" (i.e., trying to offer a generalization), the "when" connective is appropriate; but if the statement is circumstantial (that is, two acts will be directly correlated by time), "while" serves well.