On approaching the glass transition, the microscopic kinetic unit spends increasing time rattling in the cage of the first neighbors, whereas its average escape time, the structural relaxation time τα, increases from a few picoseconds up to thousands of seconds. A thorough study of the correlation between τα and the rattling amplitude, expressed by the Debye-Waller factor, was carried out. Molecular-dynamics simulations of both a model polymer system and a binary mixture were performed by varying the temperature, the density ρ, the potential and the polymer length to consider the structural relaxation as well as both the rotational and the translation diffusion. The present simulations, together with MD studies on other glassformers, evidence the scaling between the structural relaxation and the caged dynamics. An analytic model of the master curve is developed in terms of two characteristic length scales ̄a2 1/2 and σa 21/2, pertaining to the distance to be covered by the kinetic unit to reach a transition state. The model does not imply τα divergences. The comparison with the experiments supports the numerical evidence over a range of relaxation times as wide as about eighteen orders of magnitude. A comparison with other scaling and correlation procedures is presented. In particular, the density scaling of the length scales ̄a2 1/2, σa21/2 ρ -1/3 is shown to be not supported by the present simulations. The study suggests that the equilibrium and the moderately supercooled states of the glassformers possess key information on the huge slowing-down of their relaxation close to the glass transition. The latter, according to the present simulations, exhibits features consistent with the Lindemann melting criterion and the free-volume model. © 2009 American Institute of Physics.