Jump to content

Rearrangeable Layout


cpugeek
 Share

Recommended Posts

I'm currently trying to add a rearrangeable layout function to my website, and all the examples I'm finding use a cookie which won't matter if logging in on a different device. I have the animations completed, but nothing that remembers the layout. I would think the other best option would be to remember it in a mysql database. Anyone know of a solution or have any ideas?

Link to comment
Share on other sites

if its for user of your site then i think its best to use cookie. puling the data only on every page request for layout seems little inefficient.The best would be to use of cookies but in case of cookie is disabled by the user browser it will fall back to pull data from database. Its quite dependent what your are going to acheive and what data you are going to serve.More info about it would be more helpful.

Link to comment
Share on other sites

think that storing the user preference in a database or even a secure serverside xml file is your best bet for persisting user preferences across devices / browsers; if there's not too much data you can haul it into a cookie if its not detected in the cookie and then proceed to read it from the cookie on subsequent page loads. One advantage to using a file over the database is that you could avoid the cookie storage mechanism all together, store larger amounts of data, and take advantage of http caching for susequent loads. On the downside, depending on your expected volume of users you could end up with a lof of files. I won't go into the specifics of how to implement that as it'll vary based on your platform.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...