Spontaneous activity drives the establishment of appropriate connectivity in different circuits during brain development. In the mouse primary visual cortex, two distinct patterns of spontaneous activity occur before vision onset: local low-synchronicity events originating in the retina and global high-synchronicity events originating in the cortex. We sought to determine the contribution of these activity patterns to jointly organize network connectivity through different activity-dependent plasticity rules. We postulated that local events shape cortical input selectivity and topography, while global events homeostatically regulate connection strength. However, to generate robust selectivity, we found that global events should adapt their amplitude to the history of preceding cortical activation. We confirmed this prediction by analyzing in vivo spontaneous cortical activity. The predicted adaptation leads to the sparsification of spontaneous activity on a slower timescale during development, demonstrating the remarkable capacity of the developing sensory cortex to acquire sensitivity to visual inputs after eye-opening.