{"id":34229,"date":"2021-11-22T16:36:02","date_gmt":"2021-11-22T21:36:02","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=34229"},"modified":"2021-11-22T16:36:52","modified_gmt":"2021-11-22T21:36:52","slug":"safari-forgets-your-history","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/11\/22\/safari-forgets-your-history\/","title":{"rendered":"Safari Forgets Your History"},"content":{"rendered":"<p><a href=\"https:\/\/lapcatsoftware.com\/articles\/history.html\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"https:\/\/lapcatsoftware.com\/articles\/history.html\"><p>Clicking a link in a web browser changes the URL, and if you look at the browser&rsquo;s history after clicking, you&rsquo;ll see both the old URL and the new URL. The URL can also be changed programmatically, using the JavaScript <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Location\" title=\"MDN Web Docs\">Location API<\/a>. After a new location is assigned in JavaScript, you should also see the old URL and the new URL in the browser&rsquo;s history. You should, and you do in Chrome and Firefox. But not in Safari! For some reason, Safari forgets the URLs. This bug appears to be many years old: it occurs in the latest version 15.1, and it occurs in the oldest version that I could test, Safari 11 on macOS 10.13 High Sierra. You can reproduce the bug by simply clicking the button below.<\/p><p>[&#8230;]<\/p><p>If you want to see how this Safari bug plays out in &ldquo;the real world&rdquo; as opposed to just my contrived test, take a look at your history after searching the web with DuckDuckGo. Below you can see that I&rsquo;ve clicked on a DuckDuckGo search result, but the new URL is missing from my Safari History.<\/p><\/blockquote>\n<p>This bug has been bothering me for years, and it does seem to primarily affect pages that I visited via search results.<\/p>","protected":false},"excerpt":{"rendered":"<p>Jeff Johnson: Clicking a link in a web browser changes the URL, and if you look at the browser&rsquo;s history after clicking, you&rsquo;ll see both the old URL and the new URL. The URL can also be changed programmatically, using the JavaScript Location API. After a new location is assigned in JavaScript, you should also [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-11-22T21:36:05Z","apple_news_api_id":"e5e5ec98-8c13-46d0-9ff9-b68ed620172b","apple_news_api_modified_at":"2021-11-22T21:36:55Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/A5eXsmIwTRtCf-baO1iAXKw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,1469,30,2077,103,343],"class_list":["post-34229","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-duckduckgo","tag-mac","tag-macos-12","tag-safari","tag-search"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=34229"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34229\/revisions"}],"predecessor-version":[{"id":34230,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34229\/revisions\/34230"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=34229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=34229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=34229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}