{"id":407,"date":"2008-07-26T17:06:55","date_gmt":"2008-07-26T22:06:55","guid":{"rendered":"http:\/\/www.phpied.com\/locationlocation\/"},"modified":"2008-07-26T17:41:39","modified_gmt":"2008-07-26T22:41:39","slug":"locationlocation","status":"publish","type":"post","link":"https:\/\/www.phpied.com\/locationlocation\/","title":{"rendered":"location=location"},"content":{"rendered":"<p><code>location = location<\/code><br \/>\n... and 534 other ways to reload the page with JavaScript<\/p>\n<p>How many ways you can think of when you want to reload the current page with JavaScript? I counted 535 before I got bored, maybe someone can pick up from there? The cases are so much that I had to write a script to generate them \ud83d\ude42<\/p>\n<p>&raquo; <a href=\"https:\/\/www.phpied.com\/files\/location-location\/location-location.html\">have fun, see for yourself<\/a><\/p>\n<p>Just occurred to me that I didn't even include the <code>frames<\/code> property in those 535 ways. Consider the limitless possibilities having in mind for example that:<\/p>\n<pre>\r\n>>> window.frames === window\r\ntrue\r\n>>> frames === window.self\r\ntrue\r\n<\/pre>\n<p>Could you come up with 500 more ways? A 1000? One condition: no recursion, for example <code>window.self.window<\/code> is not allowed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>location = location &#8230; and 534 other ways to reload the page with JavaScript How many ways you can think of when you want to reload the current page with JavaScript? I counted 535 before I got bored, maybe someone can pick up from there? The cases are so much that I had to write [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/posts\/407"}],"collection":[{"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/comments?post=407"}],"version-history":[{"count":0,"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/posts\/407\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/media?parent=407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/categories?post=407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpied.com\/wp-json\/wp\/v2\/tags?post=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}