A method is shown for preventing temporal broadening of ultrafast optical pulses in highly dispersive and fluctuating media for arbitrary signal-pulse profiles. Pulse pairs, consisting of a strong-field control-pulse and a weak-field signal-pulse co-propagate, whereby the specific profile of the strong-field pulse precisely compensates for dispersive phase in the weak pulse. A numerical example is presented in an optical system consisting of both resonant and gain dispersive effects. Here we show signal-pulses that do not temporally broaden across a vast propagation distance, even in the presence of dispersion that fluctuates several orders of magnitude and in sign (for example within a material resonance) across the pulse's bandwidth. Our approach illustrates the potential for using cross-phase modulation to compensate for dispersive effects on a signal-pulse and fills the gap in the current understanding of this nonlinear phenomenon.