You can definitely use a database connection and access it via system.db.* functions.
As for cookie storage, not sure it's a thing yet with Ignition perspective. I used the search function on this forum and found this for you though.
Cache data between Perspective sessions on same device | Voters | Inductive Automation