Is it possible to refresh page before it gets loaded?
<p>What if my website was updated, i mean the CSS and some content, and after the update old visitors when comming back on my page the CSS is not auto refreshing, you have to manually refresh the page. Well, visitors are not experts and they will think first that the page is broken or smthing.</p>

<p>How to make a script with Javascript or PHP, any... so that when some one is accessing the page/website, i want the page to be refreshed be fore it will open to the visitor.
It will be ok if it will do the job only on the index page.</p>

<p>Is it possible? </p>

<p>I found this script with google help, but its not working, nothing is happen!</p>

<pre><code>&lt;script type='text/javascript'&gt;

(function()
{
  if( window.localStorage )
  {
    if( !localStorage.getItem( 'firstLoad' ) )
    {
      localStorage[ 'firstLoad' ] = true;
      window.location.reload();
    }  
    else
      localStorage.removeItem( 'firstLoad' );
  }
})();

&lt;/script&gt;
</code></pre>
