Firms want depth of experience
Age is no longer the barrier it once was. Employers are not concerned about age in IT, the emphasis is on the skill levels you have and what you can bring to the company.
At 39 you will most certainly not be seen as too old to move into the Internet arena. That area has a vast shortage (as do most others) of quality individuals who not only understand languages such as Java and XML but the source code beneath it. Companies want to be more independent of software houses and need applicants with a real depth of experience.
With regards to what route would be the safest until retirement, I have to say either. The contract market is showing signs of growth and the permanent market is constantly buoyant, although there has been a slow down from November last year.
Your decision ultimately depends on what you want from the position. If you want freedom and higher earnings, then you have to take a slightly increased risk and go for a contract role. However, if you are looking to develop your skills and get free training and holiday/sick pay then go for a permanent role.
Whatever your decision, don't let your age be a factor. I regularly find positions for people in their early 60s - the only proviso tends to be on pensions as most are closed off at 60. At 39 you should not have a problem.
The panel: Apex, MSB International, Best International Group, Computer Futures, Computer People, Elan, E-skills NTO, Monarch Recruitment, Reed Computing, Netheads Consulting