Similarity function is the key to accuracy of collaborative filtering algorithms. Adding a time factor to it addresses the problem of handling the web data efficiently as it is highly dynamic in nature. The data used in collaborative filtering algorithms is collected over as long period of time, in the form of feedbacks, clicks, etc. The interest of user or popularity of an item tends to change as new seasons, moods or festivals. The similarity function with temporal factor can efficiently handle the dynamics of web data as it captures and assigns weightage to the data. More recent data is given more weightage when similarity is calculated. in this way, the recent trends and older and obsolete data values are discarded when new unobserved items are predicted using collaborative filtering algorithms. Hence, better results and more accuracy.