clean up PDF.js request, preferences, and URL forming