Ah, in the Christian "unofficial" tradition too!
"I realized how many of the stories I was told by nuns in grade school weren’t actually in the Bible. I gave, as an example, the story of how Jesus, Mary, and Joseph, in their flight to Egypt to escape Herod Antipas’ attempt to kill all potential Kings of the Jews, they hid in a cave from pursuing soldiers. After they entered the cave, spiders spun webs across the entrance to the cave causing the soldiers to believe that the Holy Family couldn’t have possibly entered the cave.
A commenter wondered if the story I related was inspired by a similar one about David fleeing from King Saul for the exact same reason. Unlike the story about the Holy Family, the tale of David hiding in a cave, minus the spiders, is actually in the Bible."
https://freethoughtblogs.com/pharyngula/2025/10/17/needs-more-spiders/
@temptoetiam I'm positive I did watch an old adventure movie where this exact same thing happened, but at the entrance of a cave, I think, or a tunnel. I can't remember which movie it was, but for some reason the memory is linked to Ray Harryhausen (I'd be forever grateful if someone can tell me the title)
As a little kid, I thought this was the most ingenious idea ever, and the image stuck with me forever.
Thank you for sharing this, I had no idea it had so much history.