[{"data":1,"prerenderedAt":108},["ShallowReactive",2],{"snippet-safari-back-forward-cache-override":3,"snippets-surround-safari-back-forward-cache-override":104},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"createdAt":10,"tags":11,"body":14,"_type":98,"_id":99,"_source":100,"_file":101,"_stem":102,"_extension":103},"/snippets/safari-back-forward-cache-override","snippets",false,"","Safari back-forward-cache override",null,"05/03/2024",[12,13],"javascript","safari",{"type":15,"children":16,"toc":94},"root",[17,62,69],{"type":18,"tag":19,"props":20,"children":23},"element","div",{"className":21},[22],"c-code-wrapper",[24,27,49],{"type":25,"value":26},"text","\n  ",{"type":18,"tag":19,"props":28,"children":31},{"className":29},[30],"c-code-wrapper__header",[32,34,40,41,48],{"type":25,"value":33},"\n    ",{"type":18,"tag":19,"props":35,"children":38},{"className":36},[37],"c-code-wrapper__title",[39],{"type":25,"value":8},{"type":25,"value":33},{"type":18,"tag":19,"props":42,"children":45},{"className":43},[44],"c-code-wrapper__copy",[46],{"type":25,"value":47},"Copy",{"type":25,"value":26},{"type":18,"tag":50,"props":51,"children":56},"pre",{"className":52,"code":54,"filename":55,"language":55,"meta":7},[53],"language-js","// Safari back-forward-cache override\n(function () {\n  window.onpageshow = function (event) {\n    if (event.persisted) {\n      document.body.style.opacity = 0;\n      window.location.reload();\n    }\n  };\n})();\n","js",[57],{"type":18,"tag":58,"props":59,"children":60},"code",{"__ignoreMap":7},[61],{"type":25,"value":54},{"type":18,"tag":63,"props":64,"children":66},"h2",{"id":65},"further-reading",[67],{"type":25,"value":68},"Further reading",{"type":18,"tag":70,"props":71,"children":72},"ul",{},[73,85],{"type":18,"tag":74,"props":75,"children":76},"li",{},[77],{"type":18,"tag":78,"props":79,"children":83},"a",{"href":80,"rel":81},"https://stackoverflow.com/a/13123626/5527156",[82],"nofollow",[84],{"type":25,"value":80},{"type":18,"tag":74,"props":86,"children":87},{},[88],{"type":18,"tag":78,"props":89,"children":92},{"href":90,"rel":91},"https://web.dev/articles/bfcache",[82],[93],{"type":25,"value":90},{"title":7,"searchDepth":95,"depth":95,"links":96},2,[97],{"id":65,"depth":95,"text":68},"markdown","content:snippets:safari-back-forward-cache-override.md","content","snippets/safari-back-forward-cache-override.md","snippets/safari-back-forward-cache-override","md",[9,105],{"_path":106,"title":107},"/snippets/show-all-non-native-window-properties","Get all non native window variables",1788788972379]