First visit date

Suggestions and feature requests for the Pale Moon browser

Moderator: satrow

User avatar
Utnapishtim
Moonbather
Moonbather
Posts: 66
Joined: 2018-07-12, 02:42

First visit date

Unread post by Utnapishtim » 2019-07-16, 01:23

Anyone in favor of re-adding the first visit date column in the History window that Mozilla killed years ago?

It used to be First visit date and Last visit date, now it's just Visit date. The earliest visit date is reconstructable because places.sqlite still contains the date for every visit (not just the last one) and I regularly run an SQL script to put the smallest date in the last_visit_date column so that the History window shows me first visit dates.

You would need to add a column to the moz_places table in the database, add a column to the History window and presumably add the first visit date when storing a newly visited page in history.

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 5863
Joined: 2012-10-09, 19:37
Location: Sector 001

Re: First visit date

Unread post by New Tobin Paradigm » 2019-07-16, 01:45

The real question is.. Is anyone in favor of doing the work and regardless if the data is still stored.. Is there an api to retrieve it?

Personally, I don't think it is important. Additionally, you do know places is far different from the old history system before it right?

User avatar
Utnapishtim
Moonbather
Moonbather
Posts: 66
Joined: 2018-07-12, 02:42

Re: First visit date

Unread post by Utnapishtim » 2019-07-16, 02:06

New Tobin Paradigm wrote:
2019-07-16, 01:45
regardless if the data is still stored.. Is there an api to retrieve it?
I don't know what are you guys using now but I can't reckon how the retrieving method would be much more complicated than the one for the last visit date, since it's basically an SQL query.

I think the worst possible regression would be if you have SELECT * FROM moz_places queries in the code, those would break if you add an extra column to the table. I didn't find any searching your code on github altho I'm not sure what a few functions that take it as an argument are doing.

I don't know what the old history system used but places is SQL so it lends itself well to this sort of thing, and I think it'd be a cool little selling feature to old Mozilla users.

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 5863
Joined: 2012-10-09, 19:37
Location: Sector 001

Re: First visit date

Unread post by New Tobin Paradigm » 2019-07-16, 02:15

Yeah but we can't just directly access the sqlite db as simply as that. It has to be done according to the places backend.

Also given the fact that the history isn't static and old entries drop off based on arbitrary rules there can never BE a first visit.
Last edited by New Tobin Paradigm on 2019-07-16, 02:18, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 24449
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: First visit date

Unread post by Moonchild » 2019-07-16, 02:16

Off of the top of my head, I don't think a "first visit date" is stored. There's no real use for recording that (unlike last visited which will determine among other things if the entry will be eligible for being purged).
"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne
Image

User avatar
Utnapishtim
Moonbather
Moonbather
Posts: 66
Joined: 2018-07-12, 02:42

Re: First visit date

Unread post by Utnapishtim » 2019-07-16, 02:20

Moonchild wrote:
2019-07-16, 02:16
I don't think a "first visit date" is stored. There's no real use for recording that (unlike last visited which will determine among other things if the entry will be eligible for being purged).
No use to the program. I myself as the user have no use for last visit date ;) if I ever look the date up I'm interested in when I first saw a webpage. I used to add #s to the end of the page so that I don't overwrite old entries for a long time until I made the SQL hack.

Edit:
New Tobin Paradigm wrote:
2019-07-16, 02:15
Also given the fact that the history isn't static and old entries drop off based on arbitrary rules there can never BE a first visit.
Hmm okay you've got me there. I have that about:config setting set so that nothing gets purged, so I didn't think of this.

Edit 2:
I've thought about this a bit and it could actually work as a useful feature for people with pruning enabled. If moz_historyvisits is pruned and not moz_places, and moz_places is then rebuilt or pruned based on the new moz_historyvisits, then pages which had visits pruned will still retain the old first visit date.

This way, people can have old visits pruned for performance but still know when they first visited a page, which is info they couldn't even recreate now from the SQL db. Granted, they won't have that info for the pages that got pruned before this feature but still it's better than nothing.

Post Reply