Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have written a C#.NET app to fetch browser's history of websites visited by a user on his machine. But, I want his actual time while visiting sites. For example,

1. If user just visits a website for 3 minutes.
2. Next, he lets this website remain open in a tab for 2 hours
3. Next, he goes on to do some other task on his machine

So, total time visiting the site should be 3 minutes only.

What I have tried:

In the approach I used, it returns 2 hours, but I am looking to get 3 minutes. Please advise.
Posted
Updated 25-Jun-21 1:54am
v3
Comments
Richard MacCutchan 23-Jun-21 8:56am    
It's impossible to gather such information. I typically have ten to fifteen tabs open in my browser even when I am not in the room.
Maciej Los 23-Jun-21 9:27am    
Me too ;)
Richard MacCutchan 25-Jun-21 7:58am    
The answer has not changed since yesterday.
Richard MacCutchan 28-Jun-21 3:43am    
Pointers to what? I have no idea what that app does or how it works. But either way it does not change the answers that you have been given on this question.

It also begs the question, why try and create an application like desktime, when desktime already exists?
Member 15244870 28-Jun-21 5:05am    
They don't want to purchase it. They have to develop an app in-house.

1 solution

There's no way to determine those times.

An open tab is "viewable", but you have no way of knowing how long it's been that active window, and even that doesn't mean it's being "view".

There's no such thing as "user visits a website for <x minutes>". Visits isn't a thing in a browser at all. A browser just makes a request of a web server, the server responds with a page, and the browser renders the page and displays it. That's all. How long that page is display is not tracked by the browser.
 
Share this answer
 
Comments
Member 15244870 28-Jun-21 2:05am    
@Dave , Checked with customer. They want to develop an application similar to https://desktime.com/ . Can you give some pointers ?
Dave Kreskowiak 28-Jun-21 9:56am    
Nope. Never heard of time. Never used it. Don't want to.

Honestly, software like this sounds like a great way to destroy morale at a company.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900