Scientists have looked into the question and delivered their answer.
UVB and UVA: can ultraviolet rays pass through glass?
There are two types of ultraviolet rays: ultraviolet type B (UVB) and ultraviolet type A (UVA) rays. UVB rays are more powerful and harmful to the skin than UVA rays. The latter are the main culprits of sunburn, although high exposure to UVA can also cause a tanned complexion and mild sunburn.
Windows absorb type B ultraviolet rays unlike the UVA rays that they let through. In a study published in the scientific journal JAMA in 2016, an American ophthalmologist investigated the passage of UVA rays through the windshields and side windows of cars. In his research, Brian S. Boxer Wachler studied 29 cars from 15 different dealerships, all designed between 1990 and 2014. At the end of the analyzes, the researcher concluded that windshields still have a higher level of protection than side windows.
Bronzing through a window: the ideal solution to obtain a tanned complexion during confinement?
According to the results of this researcher, the blockage of UVA by the windshield was 96% against only 71% for the side windows. The light of type A ultraviolet rays passes through glass more easily without UVA protection, which increases the cytotoxic effects (a chemical or biological agent toxic to cells). According to Brian S. Boxer Wachler, these data could explain the increase in the rate of cataracts in the left eye and skin cancer on the left side.
It is therefore possible to tan in the car, even if it is a very light tan. As the side windows do not form a barrier to UVA, the driver or passengers may therefore have a little more colored skin or with a little sunburn after a long drive.
However, sunbathing behind glass is not the best way to achieve a perfect tan. To obtain a perfect tanned complexion, it is therefore better to prefer to expose yourself (in a reasonable way and while protecting your skin) to the sun, outdoors.
6 effective remedies to treat sunburn
Beware of sunburn during pregnancy!
Natural solutions for sunburn