The fear of spiders can develop before birth.
Scientists put pregnant crickets into terrariums containing a wolf spider. The spiders' fangs were covered with wax so the spiders could stalk but not kill the pregnant crickets. After the crickets laid their eggs, the researchers compared the behavior of the offspring with offspring whose mothers had not been exposed to spiders.
The newborn crickets whose mothers had been exposed to a spider were more likely to seek shelter and stay there. They were also more likely to freeze when they encountered spider silk or feces - a behavior that could help prevent them from being detected by a nearby spider. Overall, these newborns had better survival rates than other newborn crickets, which were eaten by the spiders for the sake of science.
(source)
