The estimation of heavy-tailed probability density function is animportant tool for the description of the Web-traffic data and thesolution of applied problems such as classification. The paper isdevoted to the nonparametric estimation of a heavy-tailed probability density function by a variable bandwidth kernelestimator. Two approaches are used: (1) a preliminarytransformation of the data to provide more accurate estimation ofthe density at the tail domain (2) the discrepancy method basedon the Kolmogorov-Smirnov statistic to evaluate the bandwidth ofthe kernel estimator. It is proved that the discrepancy methodprovides the fastest achievable order of the mean squared error.An application to Web data analysis is presented.