

Modern photon science facilities, such as X-ray Free-Electron Lasers (XFEL) are becoming increasingly combined accelerator and laser facilities. Due to the pulse nature of an FEL, ultrafast lasers play an essential role starting from the photo injector laser creating the electron bunch in the gun, over a laser heater to a potential seed laser down to the experimental station, which usually houses pump and/or probe lasers to excite the sample under investigation or probe it from Terahertz to optical frequencies. Over the last decade also great progress has been made in synchronizing all lasers as well as critical microwave sources in such facilities to better than 10 fs r.m.s. and in special cases to the sub-femtosecond level using ultrafast optical techniques. This is one to two orders of magnitude better than possible with microwave techniques. In this tutorial, we first review the principles behind the optical synchronization techniques and show their further development to the sub-femtosecond level. These technological advances will make up the first part of this lecture. In the second part of this lecture we look at the possibility to create compact, fully coherent free-electron laser sources entirely laser driven for intrinsic synchronization of all components for attosecond X-ray imaging and spectroscopy. Here the relativistic electron beam is generated by strong THz pulses generated by optical rectification and difference frequency generation of high-energy picosecond to nanosecond laser pulses and wiggling of the electrons is proposed by a optical undulators.