There is no connection between native UserDefaults and JavaScript browser storage. It appears that you're writing to one and expecting to read it in the other, but this is a misunderstanding. Each API is self-contained.
Topic:
Safari & Web
SubTopic:
General
Tags: