AI responses suggest deprecated code
So I asked this: how long does indexdb data persist?
And the response said:
Begin quote:
The data in an IndexDB database persists until the database is closed. You can close a database by calling the close() method on the database object. The close() method takes a boolean argument, force. If force is true, the database will be closed immediately. If force is false, the database will be closed when all of its open transactions have completed.
You can also specify how long you want the data in an IndexDB database to persist by setting the storage option when you open the database. The storage option takes a string value that specifies the storage location. The valid values are:
local: The data will be stored locally on the user's device.
session: The data will be stored in a session storage object.
persistent: The data will be stored in a persistent storage object.
The default value for the storage option is local. This means that the data will be stored locally on the user's device.
If you want the data in an IndexDB database to persist even after the browser is closed, you can set the storage option to persistent.
End quote
From what I can see, this is using a deprecated version of the IndexDB spec. It should be able to not suggest deprecated functionality, right?
-
Anonymous commented
This was a mistake on my part. When I changed indexdb to indexeddb, the result was *perfect*.