After a bubble bursts at a liquid surface, the collapse of the cavity generates capillary waves, which focus on the axis of symmetry to produce a jet. The cavity and jet dynamics are primarily controlled by a non-dimensional number that compares capillary inertia and viscous forces, i.e. the Laplace number La= ργR0/μ2, where ρ,μ,γ and R0 are the liquid density, viscosity, interfacial tension, and the initial bubble radius, respectively. In this paper, we show that the time-dependent profiles of cavity collapse (t < t0) and jet formation (t > t0) both obey a |t − t0|2/3 inviscid scaling, which results from a balance between surface tension and inertia forces. Moreover, we present a universal scaling, valid above a critical Laplace number, which reconciles the time-dependent scaling with the recent scaling theory that links the Laplace number to the final jet velocity and ejected droplet size. This leads to a single universal self-similar formula which describes the full history of the jetting process, from cavity collapse to droplet formation.