support document.cookie for file protocol