A method or algorithm for classifying downloaded links or URL's based on the reason behind the download. Downloads are classified into categories, for example, a "visited" URL or an "embedded" URL. Categorizing these downloads allows other applications to collect information for storage, upload, or other action. This algorithm uses information from the browser history and packet streams to obtain and categorize the links or URL's for classification.