It was narrated that Al-Mughirah bin Shu'bah said: The Messenger of Allah said: The rider should travel behind the Janazah and the pedestrian may travel wherever he wishes, and the (funeral) prayer should be offered for a child. '
It was narrated from Salim: That his father saw the Messenger of Allah, Abu Bakr and 'Umar, may Allah be pleased with them, walking in front of the Janazah.
Salim narrated: That his father told him that he was the Prophet, Abu Bakr, 'Umar and 'Uthman walking in front of the Janazah.