Submitty
Submitty copied to clipboard
Cookie Refactor
We currently have a variety of cookies throughout our system. Some of them are scoped correctly but some still store in the global scope. In course materials, we store a cm_folder_data cookie in the global scope which stores a lot of data. Cookies have a limit of 4096 bytes and there is also an overall size limit of an HTTP request for Apache.
There is a couple things which need to be done (can be split up into multiple issues):
- [ ]
cm_folder_datashould be switched from global scope to the URL of course materials.cm_folder_dataalso stores the entire system path of each course material which should be shortened to either ID or a relative path. - [ ]
anon_mode_{}exists for each gradeable and also exists in the global scope. This should be refactored to be in the specific gradeable scope. - [ ] The same applies for
default_anon_mode_{}_override. - [ ] We should look if there are any other instances that need this change too.
We should also look into switching over to local storage instead of cookies, since it's much more efficient for storing client-side data that doesn't need to be sent to the server on every request.