Added an option to specify the maximum allowed length for URLs in history.