Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>window.location = self.location; </code></pre> <p><strong>This javascript is executing</strong>. </p> <p>When it executes, the browser is being told to replace value of window.location with a new value. <strong>Not all browsers</strong> will react the same way here.. Some will probably work as you expect, but others will get smart about it and compare the two values. <strong>The browser knows</strong> what page it's on, and it knows that you're just asking for it to go to the same page.</p> <p><strong>Browser Cache</strong></p> <p>The browser even has a copy of your current page in <strong>cache</strong>. It can talk to the server and ask whether the page it has in cache is still valid. If the cache is valid, it may decide not to force a reload of the page. Behind the scenes, this happens with HTTP Headers. Browsers and servers can communicate over HTTP in many ways. In this case, your browser sends a quick request to the server saying something like this:</p> <pre><code>GET /stackoverflow.com/posts/196643/index.html HTTP/1.1 Host: www.stackoverflow.com User-Agent: Mozilla/5.0 If-Modified-Since: Sun, 12 Oct 2008 20:41:31 GMT </code></pre> <p>This is called a <strong>conditional GET request</strong>. By saying <em>If-Modified-Since</em>, your browser is saying, "Give me that file, but only if it has been modified since the last time I saw it."</p> <p>Long story short, you haven't explicitly told the browser to reload the page.</p> <p><strong>Here's how you can:</strong></p> <pre><code>location.reload( true ); </code></pre> <p>The "true" is an <strong>optional parameter</strong>, for <strong>forcing a reload</strong>. The browser won't even look at the cache.. It will just do as you say.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload