First visit date

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Utnapishtim
Fanatic
Fanatic
Posts: 141
Joined: 2018-07-12, 02:42
Location: Win7

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.

New Tobin Paradigm

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
Fanatic
Fanatic
Posts: 141
Joined: 2018-07-12, 02:42
Location: Win7

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.

New Tobin Paradigm

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: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
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).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Utnapishtim
Fanatic
Fanatic
Posts: 141
Joined: 2018-07-12, 02:42
Location: Win7

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.

Locked