Update web/viewer.js

Use asyncStorage.setItem for B2G
Merge pull request #2711 from marco-c/patch-2

Use asyncStorage.setItem for B2G