The sooner you can treat a blemish, the more likely it can be removed. Sprinkle a thin layer of salt on the dirtied area. Blot the area lightly with soda water, dish soap, and a clean, white cloth. If possible, rinse the fabric from the reverse side of the stain.  Avoid using too much pressure or a scrubbing motion when spot cleaning. This can entrench the blemish deeper into the fabric. Spot cleaning will cut down on the wear and tear of machine washing and drying, preserving the condition of your jeans for longer. Only wash your white jeans with other white clothing. If your jeans are lightly dirty, use a cold cycle. Jeans that need a more thorough cleaning will benefit from a warm cycle. Avoid fabric softener and bleach. Wash the jeans in a white brightening detergent.  Bleach can cause some jeans to yellow. Additionally, this harsh cleaner may cause your jeans to deteriorate more quickly. To best protect against yellowing, after washing your jeans in detergent, run them through another rinse cycle. High heat can also cause your white jeans to yellow. When machine drying white jeans, only use a low heat cycle. Air dry your jeans to avoid the damaging heat of a dryer. Hanging jeans in sunlight can also have a lightening effect on blemishes.

Summary:
Spot clean your jeans. Launder your jeans in a washing machine. Dry jeans on a low heat cycle or air dry them.