add cacheContents option to enable/disable storing of DOM contents in history