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