After Jesus was born the family, of course, fled Bethlehem. With the Romans hot on their heels they traveled several days without much rest, but finally, coming to an area with lots of caves, decided that they could go no further and hid in one of the caves for the night. The spiders, wanting to protect the child and his family, spun an enormous web across the entrance of the cave. When the Roman soldiers arrived they searched all the caves except the one with the family, having decided that with the huge spider web across the entrance nobody could be inside. In the morning when the family emerged, Joseph realized what had happened and gently detaching the web, laid it across a near-by bush.
Garland placed on a tree is supposed to be the modern day equivalent.