<!DOCTYPE html>
<html>
<head>
  <title>Zepto assets functional test</title>
  <meta name="viewport" content="maximum-scale=1,initial-scale=1,user-scalable=0" />
  <script src="../src/zepto.js"></script>
  <script src="../src/assets.js"></script>
</head>
<body>
  <h1>Zepto assets functional test</h1>

  <img src="test.png"/>
  
  <script>
    $('img').remove();
  </script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
  <title>Zepto assets functional test</title>
  <meta name="viewport" content="maximum-scale=1,initial-scale=1,user-scalable=0" />
  <script src="../src/zepto.js"></script>
  <script src="../src/assets.js"></script>
  <style>
    #container div {
      margin: 2px;
      padding: 2px;
      display: block;
      background-color: #ccc;
    }
    img {
      margin: 0;
      height: 100px;
      vertical-align: middle;
    }
  </style>
</head>
<body>
  <h1>Zepto assets functional test</h1>
  
  <ul>
    <li><a href="?without">Run without remove</a></li>
    <li><a href="?remove">Run with remove</a></li>
    <li><a href="?">Stop</a></li>
  </ul>
  
  <p>When running 'without remove' Mobile Safari will stop loading after on average 8 images (that's on the iPad with 1 MB images). It might also crash.</p>
  <p><strong>PLEASE NOTE:</strong> You <strong>must restart Safari</strong> between runs (click the home button to return to the home screen, double-click the home button, tap-and-hold the Safari icon, then tap the minus badge).</p>
  
  <div id="container"></div>
  
  <script>
    var prefix = 'http://stuff.vandervossen.net/temporary/zepto_assets_test/sintel-';
    var mode = window.location.search.slice(1);
    var timeout;
    if (mode !== '') {
      var i = 1;
      (function frame() {
        if (mode === 'remove') {
          $('#image' + (i - 4)).remove();
        }
        $('#container').prepend('<div>' + i + ': <img id="image' + i + '" src="' + prefix + i + '.jpg"></div>');
        if (i++ < 51) timeout = setTimeout(frame, 6000);
      })();
    }
  </script>
</body>
</html>
Load multiple images either with or without removing them.
Load multiple images either with or without removing them.
