Kris_88 wrote: ↑2025-05-15, 15:30
This is a bad solution.
It's rather "just for the completeness of the collection".
But sometimes this is the only way to get the desired result.
1) It is tied to the table structure.
It is compatible with all previous browser versions.
Yes, it can become broken any day. But the same is true for other methods (as
nsIGlobalHistory2 from the initial message).
2) You have a vulnerability - it is possible to inject SQL statements via a specially formed URL.
This depends on two things:
1. The source of that URL.
2. The foresight of the person who will use it.
And in any case, every other method use a similar query at the end of call chain. How can one be sure that
nsINavHistoryQuery or
getPageTitle is not prone to such injection?
3) It is long.
Just for readability. But it can be simplified to 3 operators - as well as its competitors
And among others it is the fastest one and consumes the least memory.