Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make javascript load faster?
    text
    copied!<p>Right now, we have a slideshow of images that uses javascript. However, when the page is still loading, the images would be briefly shown in a normal listed style (with bullets) before the javascript gets read and executed. Problem is, we don't want visitors to see the "naked" image list, even just briefly (sometimes it would last 2-3 seconds). We want them to <em>immediately</em> see just one image (not a list) that morphs into another (what the js does). </p> <p>This is the html code for the slideshow:</p> <pre><code>&lt;div class="slideshow"&gt; &lt;ul&gt; &lt;li&gt;&lt;img src="images/....jpg" /&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="images/....jpg" /&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="images/....jpg" /&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="images/....jpg" /&gt;&lt;/li&gt; &lt;li&gt;&lt;img src="images/....jpg" /&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>This is the slideshow that we used:</p> <p><a href="http://www.littlewebthings.com/projects/blinds/" rel="nofollow">http://www.littlewebthings.com/projects/blinds/</a></p> <p>and this is the JS file:</p> <p><a href="http://www.littlewebthings.com/projects/blinds/js/jquery.blinds-0.9.js" rel="nofollow">http://www.littlewebthings.com/projects/blinds/js/jquery.blinds-0.9.js</a></p> <p>I am thinking that this may be a cache problem as the demo slideshow above only showed the "naked" image list once. Once it is refreshed/re-visited, it no longer shows (or still shows but a lot faster than the first time that it's almost unnoticable). Ours, on the other hand, keeps on re-reading the javascript as if it's always the first time (if you know what I mean).</p>
 

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