The site of the town has been occupied from ancient times; it is noted in Julius Caesar's book about the Gallic Wars. Centuries later, it became an important place under the French monarchy, as a royal hotel. It would also be used as a post relay, the first one on the road to Fontainebleau. It became a major road and railway junction in the 1840s after its railway station was built in 1840, and after 1893 was the first city surrounding Paris with a bridge crossing the river Seine.