On less traveled trails, some hikers attach a small bell to their backpack, in case there is an animal around that you don't want to run into, a noise might scare it away. They usually don't want to run into you either. So the thinking being if it hears the bell you may scare it away before you have a run in.
I have never tested this theory but that was the line of thinking that was explained to me by another hiker that I met on the trail once that had one.
Free untested advise
I agree on the bugspray comment