PrefetchJS

Javascript Caching - Caching at the Client-Side



Minimize disturbing page load or lazy img render effects with "unobtrusive Javascript".

The user should not intercepted with network circles and loading time. The Javascript is unobtrusive, if JS is not available the website is working anyway with the common doing.

abstract:

The network circle time should overlayed with the watch and read time.

The waiting time (for the network circle) should decrease approximately to a view milliseconds by preloading content to the client. If the DOM tree is loaded preloading-engine starts for available anchors, while the user read or use the current content. After images, content, thumbs are loaded the Javascript and CSS performance time is done in minor milliseconds.
The layout build has no flickering and is not disturbed.

approach:

(1) The preload-engine search for all defined anchors

(2) It loads HTML content for the found anchors

(3) The site change woks without waiting for network cycle requests

(4) The aim is that the site change happens only on client-side

download page: www.PrefetchJS.de

GitHub: https://github.com/DanielFloeter/PrefetchJS

jQuery.PrefetchJS:

<script language="JavaScript" type="text/javascript"
  src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script language="JavaScript" type="text/javascript"
  src="jquery.PrefetchJS-0.9.2.1.js"></script>

<script language="JavaScript" type="text/JavaScript">

  $(document).ready(function () {
    $('.Container').skin({
      Anchor: 'a',
      Location: 'href',
      exclude: '.doNotPreload'
    });

  });
</script>

Links/Anchors:

Commmon anchors are possible and recommended (unobtrusive Javascript).

<a href=“mos/index.html“>HOME</a>
<a href=“mos/central.html“>CENTRAL</a>

HTML Content:

Set a class at the container-tag in all pages which were reached from anchors.

<div class="Container"> 
   <h1>DBX 120A Subharmonic Synthesizer – NEW</h1>
</div> 

demo pages: www.PrefetchJS.de/demopage/index.html

© Kometschuh.de | Impressum | GitHub | Facebook |