Lots of comments on the biology. Just wanna mention it is also behavioral. Humans, for different reasons, will insist on staying in the sun even when they can get sunburn. Animals just run to the nearest shelter (or water, mud, etc.) and stay there.
If you walk your dogs, make sure they are protected from the sun and the scorching hot pavement. Get them sunscreen and puppy shoes. You don’t have to walk your dogs if they don’t want to be out there.
Latest Answers