Write a function that stores URLs in chronological order and if a URL already exists then keep only the last one of the two.