Could you please tell me the difference between these
When have you seen him?
When did you see him?
Also can I use before in the following sentence:
Have you seen him before?
I mean present perfect is used when there is no specific time, so is before counted as a time phrase.