title: How to show page preloader only once while entering through domain name?
body: <p>So, I have jQuery page preloader on main page like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(window).load(function() {
          $("#preloader").delay(700).fadeOut("slow");
      })
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;div id="preloader" class="preloader"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>This shows 4 times:</p>
  
  <ol>
  <li>When I enter the site through domain name;</li>
  <li>When I refresh main page by F5;</li>
  <li>When I click on logo (i must go to main page when i clicked that);</li>
  <li>When I click «Home» menu item.
  But i want to show it only on first two times.
  So, the first idea which came in my mind is delete <code>div</code> class to not show preloader image over whole page when i clicking logo or menu item by JS. And have used this:</li>
  </ol>
  
  <blockquote>
    <p>document.getElementById("preloader").className = 'test';</p>
  </blockquote>
  
  <p>But then... I realized that by clicking menu item to load main page again, i create new copy of document, so my preloader has his class again and showed up. So, i decided to use AJAX and to not reload whole page by clicking menu item or logo. Now i use this:</p>
  
  <pre><code>     &lt;script type="text/javascript"&gt;
          $(document).ready(function(){
               $("#blog, #logo").click(function(){
                   $("#container").load("/blog");
                   document.getElementById("preloader").className = 'test';
               });
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>So, when i click logo or menu item i load my category called «blog» in container. And my side bar looks like this:</p>
  
  <pre><code>...        
  &lt;a href="javascript:;" id="logo"&gt;&lt;i class="logo"&gt;&lt;/i&gt;&lt;/a&gt;
  ...
  &lt;li class="m_blog"&gt;&lt;a id="blog" href="javascript:;"&gt;&lt;i class="icon"&gt;&lt;/i&gt;Blog&lt;/a&gt;&lt;/li&gt;
  ...
  </code></pre>
  
  <p>So, it works! Preloader appear only when you open site through domain name. But 1 problem appear. When i open category «video» i have adress like this: mysite.com/video/</p>
  
  <p>And when i came back to main page through logo or menu i have same adress! Because content loading without reload whole page and adress doesn't change. How i can fix it? Help me, please! I just want to show my preloader only once: when i came through domain name or refresh main page by F5. I already feel dizzy, because i only know HTML and CSS, but today start to learn AJAX and jQuery. Help me in this matter. </p>