Iframe localStorage on Safari and Safari mobile

前端 未结 1 1593
没有蜡笔的小新
没有蜡笔的小新 2020-12-14 15:15

I have a javascript function that will execute in an iframe of my page to set a localstorage. On another page, another iframe hosted on the same domain will try to read the

相关标签:
1条回答
  • 2020-12-14 15:43

    The issue with Safari is caused by the "block cookies and other website data" preference which is set to "From third parties and advertisers" by default.

    Update: on Safari 8, this option is "Cookies and website data: Allow from websites I visit".

    The expected behaviour is only available if the user sets this option to "Never", as seen in the following picture: http://i.stack.imgur.com/AP4ed.png

    It's unlikely that there is a loophole unfortunately - the intention of the setting is clear.

    0 讨论(0)
提交回复
热议问题