I'm storing text in a cookie that is pulled from the DB and displayed on every page. The data is randomly selected from the DB, but it must remain persistant for the duration that the user is working withing the section.
Essentially what these cookies contain is a recommendations for solutions to the user's situation.
These recommendations are displayed on the page and the user selects the choices that they prefer.
Currently, there are 16 cookies each containing approx. 500 bytes of text. However I'm having a problem displaying the cookies because I'm getting the following error:
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Somehow the cookies are being sent in one large cookie which exceeds the 4k limit.
I built it using cookies vs. sessions because I thought that cookies would minimize the memory requirements of the server in the event of heavy traffic.
I orginally was going to query the DB for every page but quickly realized that this would give me horrible DB performance.
I do think that sessions would increase speed and would alleviate this problem that I am running into, but I worry about the scalability of the project.
8k per user can add up pretty fast.
Is my thinking correct?
Bryan