Web Design expert - XHTML & CSS developer - jQuery builder - Graphic Designer
FFA employee - Husband - Step Dad - Brother - Son - Believer - Basketball player
Oil Painter - Percussionist - Pitt Illumni - ESPN Fanatic - Red Box enthusiast

Blog | Dec 5, 2011

Track file sizes with jQuery

jQuery is a powerful JavaScript framework. Many web developers use it for photo gallery purposes, calendar displays and various animations. And here is one more reason why I love it so much - You can track file sizes for items loaded through web pages...

var request;
  request = $.ajax({
    type: "HEAD",
    url: $("#url").val(),
    success: function () {
      alert("Size is " + request.getResponseHeader("Content-Length"));
    }
  });


Hard to beat!



Web Design Portfolio

Graphic Design Portfolio



[X]

Friends & Inspiration

Voxiant

Insight Writer

CMS Made Simple

OscMax


You need Flash player 8+ and JavaScript enabled to view this video.

Play | Pause | Stop
[graphics/box.jpg]
[graphics/yum.jpg]
[graphics/ptso.jpg]
[graphics/ffa.jpg]
[graphics/twitter.jpg]
[graphics/storm.jpg]
[graphics/clouds.jpg]
[graphics/redbirdrmx.jpg]
[graphics/crush2pieces.jpg]
[graphics/floral.jpg]
[graphics/esv.jpg]
[graphics/dbz_spirit_bomb.jpg]
[graphics/loveyou.jpg]
[graphics/abstract.jpg]
[graphics/cambodiav2.jpg]