document file resolution for in-browser. theoretically, it works this way