I've recently begun work on a web-based RPG game with some friends, and have recently been thinking about the best solution for loading and saving persistent variables like player life/stats and other information. I am both familiar with sessions and mysql for saving and loading variables, and that's not my question, but I am instead interested in which method would be more efficient to use. If the data is getting reloaded on each individual page, would it be more efficient on the system hosting the game to save certain numbers and variables in a session, or to reaccess the database each time it needs those numbers. My biggest concern with using sessions, is if someone were to exit the browser mid saves to the database, all information would be lost. Since it is web-based, there is no real way for me to be able to expect everyone to follow certain procedures to load/save, and I would really like to stay away from that as well, as it's not as user-friendly and intuitive as an auto-save feature. I guess my main question here is, are there ways to auto-save and guarantee data wouldn't be lost without having to load, read, write, and close a connection to mysql on each page load? I appreciate any tips, insight, thoughts, stories, or help in absolutely any fashion that I can get. Even a tip of a nature outside my question related to my project would be great. it's my first project of this kind, and I'd like to avoid any problems I can, so I'm putting a lot of forethought into it all. Also, I'm the only coder, so to have to go back and rewrite a ton of code from one save method to another is just way too much work.