He then said: Who of you likes that Allah turns His face from him? He further said: When any of you stands for praying, Allah faces him. So he should not spit before him, nor on his right side. He should spit on his left side under his left foot. If he is in a hurry (i.e. forced to spit immediately), he should do with his cloth in this manner. He then placed the cloth on his mouth and rubbed it off.
He then said: Bring perfume. A young man of the tribe stood and hurried to his house and returned with perfume in his palm. The Messenger of Allah (ﷺ) took it and put it at the end of the twig. He then stained the mark of phlegm with it.
Jabir said: This is the reason you use perfume in your mosques.
In-book : Book 2, Hadith 95
English translation : Book 2, Hadith 481