Website owners can cast aside their crystal balls - now there are reliable ways of predicting which news stories, blogs or video clips will prove popular in the long term, allowing them to allocate extra bandwidth if they need to.

Although the number of hits an online item receives when first published should give some indication of future popularity, such forecasts tend to be inaccurate as daily and weekly fluctuations in overall website traffic will skew the results.

Now Bernardo Huberman and Gabor Szabo from HP Labs in Palo Alto, California, say they can account for such effects. They focus not on the actual number of hits but on the rate at which an item picks up views when first put online - suitably adjusted so that views when traffic to a site is low are given more significance than when it is busy. Using this measure, they found they could predict the subsequent popularity of 90 per cent of the content on the video-sharing site YouTube.com and the news aggregator Digg.com.

Since Digg stories generally peak in popularity after a few days, whereas YouTube videos can be much watched for months, the team trained its software on detailed data from each website to determine the exact relationship between initial activity and long-term popularity. The team found that by applying their method to views of Digg stories within 2 hours of publication, they could predict the popularity of those stories 30 days after their appearance to within 10 per cent of the actual number of hits. They achieved comparable results for YouTube clips.

HP's approach isn't the only method of forecasting traffic. The video search engine blinkx.com says it can make similar predictions by analysing the number of distinct sites to which clips are uploaded rather than the number of initial downloads. Their approach allows them to identify the most consistently popular videos and put them at the top of their search results.

Alan Mislove from the Max Planck Institute for Software Systems in Saarbrücken, Germany, says this work could point web advertisers to the most viewed areas of a website and be useful in deciding how much bandwidth to assign to individual videos - particularly if it can indicate popularity by region. "If you knew a video would only be popular in Europe, you could decide not to host it in the US," he says.