Used 'documentURI' instead of 'document' object to persist the UI
attributes across browser sessions (related to issue 7640)