The 34-year-old, who left Burnley at the end of last season, has been on trial with the Terriers for the last two weeks.
Town boss Stan Ternent confirmed to the club's official website: "We've agreed a deal with David, subject to his medical that will take place on Monday.
"However, he's signed a non-contract registration with us and will therefore be available for selection and in the squad for the game against Stockport County."