Combining multiple files into a single HTTP request

on twitter davelaker asked:

Question

“David Laker @ijasonwhite I have JS files tht are called separately I want to make fewer HTTP requests without actually physically combining them .”

Answer

Document uses file “combined.js.php” as javascript source, this is the file that will be HTTP requested and also the file that does the combining. Continue Reading…

HOWTO: Setup Compression in IIS6 Web Server

To enable server-wide HTTP compression

“To more efficiently use available bandwidth, enable IIS HTTP compression. HTTP compression provides faster transmission time between compression-enabled browsers and IIS, regardless of whether your content is served from local storage or a UNC resource. You can compress static files and application response files. Compressing application response files is usually called dynamic compression.” That’s great, although it’s not enabled by default! 

You could do this via the MMC IIS6 snapin, I prefer to keep things a little more simpel and efficient. The batch file below will configure IIS compression for you, simply copy and paste from below into Notepad and save as “setIISCompression.bat”. Run the batch file, done! Continue Reading…

WordPress Twitter Followers Widget

I was using a plugin form another developer that inextricably stopped working, not sure why or how. After contacting the author and getting zero response I decided to write my own twitter widget plugin for WordPress. Continue Reading…

Create a date and time stamped folder from dos cmd prompt

ok so you need to create a directory based on the current time and date, a timestamp if you will.

its easy, type this into your cmd window …

mkdir %date:~-4,4%%date:~-7,2%%date:~0,2%-%time:~0,2%%time:~3,2%%time:~6,2%

this will give you a directory named like YYYYMMDD-HHMMSS

Enjoy.

Session_OnEnd not being called in your global.asa ( kb 934903 )

You and me both, well at least me until i discovered that Microsoft had released IIS6 with a big bug in the ASP.dll and then installed the Hotfix.

For some reason the bug simply causes the session to end without calling the sub routine Session_OnEnd in your global.asa file.Why and how they missed this, and why the fix hasn’t been released generally begs some questions.

Luckily for me I am the recipient of great Microsoft support.You can try your luck by going here and following the instructions. MS might if you ask nicely send you the fix as they have not released it for download.

Delphi explode() function like PHP explode()

type
    TArray = array of string;

function explode(cDelimiter,  sValue : string; iCount : integer) : TArray;
var
s : string; i,p : integer;
begin

        s := sValue; i := 0;
        while length(s) > 0 do
        begin
                inc(i);
                SetLength(result, i);
                p := pos(cDelimiter,s);

                if ( p > 0 ) and ( ( i < iCount ) OR ( iCount = 0) ) then
                begin

                       
                        result[i - 1] := copy(s,0,p-1);

                        {updated, thanks Irfan}
                        s := copy(s,p + length(cDelimiter),length(s));
                end else
                begin result[i - 1] := s;
                        s :=  ”;
                end;
        end;

end;

use like this

explode(‘,’,'test,test,tets’, 0) ;
or
explode(‘|’,'test|test|tets’, 2) ;
or

a := explode(‘,’,'test,test,tets’, 0) ;
for i := 0 to High(a) do
begin
showMessage(a[i]);
end;