Avoid Salty or High-potassium Foods
Like we mentioned before, mosquitoes can detect humans from 100 feet (30.5 meters) away. If you're out in the heat and you've been sweating, you'll have a stronger scent and be even more vulnerable to bites. If you've been eating foods that contain high levels of salt or potassium, your body will produce an increased level of lactic acid. Mosquitoes and other insects are attracted to the smell of lactic acid, so your scent will be even more appealing to them [source: DeGaborik].
To avoid this, stay away from food that contains high levels of salt and potassium. This will reduce the amount of lactic acid that your body produces and thus decrease the likelihood that your scent will attract insects.