Humans have all kinds of security to protect our homes, whether it is an advanced home security system, a barking dog, or just a motion activated light, so it makes sense that spiders would have their burglar alarms, alerting them to intruders attacking their web.
I’m talking specifically about some Orb Spiders that take extra security measures. As it turns out, they use a chemical in their web silk that does a good job of repelling ants. A recent study at the National University of Singapore sheds some light on the whole spider/ant war. Since ants are often found in the webs of some spiders, why were they rarely seen in the webs of orb-web spiders?
To answer that question researchers had to determine what repelled the ants, so they collected wild orb-web spiders and did chemical tests on their silk. One chemical called 2-pyrrolidione proved to repel ants in the lab, even when a delicious snack was offered as enticement.
Interestingly, young spiders have no need of this chemical weapon as their silk is too thin for the smallest of ants to navigate; but when they get older and have the need, they are capable of defending their web.