Cerebral Autoregulation (CA) refers to the capability of the brain to maintain a more or less stable cerebral blood flow (CBF), despite the changes in blood perfusion. Monitoring this mechanism is of vital importance, especially in neonates, in order to prevent damage due to ischemia or hemorrhage. In clinical practice near-infrared spectroscopy (NIRS) measurements are used as a surrogate measurement for CBF. However, NIRS signals are highly dependent on the variations in arterial oxygen saturation (SaO2). Therefore, only segments with relatively constant SaO2 are used for CA assessment; which limits the possibilities of the use of NIRS for online monitoring. In this paper we propose the use of subspace projections to subtract the influence of SaO2 from NIRS measurements. Since this approach will be used in an online monitoring system, this preprocessing is carried out in a window-by-window framework. However, the use of subspace projections in consecutive segments produces discontinuities; we propose a methodology to reduce these effects. Obtained results indicate that the proposed method reduces the effect of discontinuities between consecutive segments. In addition, this methodology is able to subtract the influence of SaO2 from NIRS measurements. This approach facilitates the introduction of NIRS for online CA assessment.