Handling downloading documents & keeping state for web view