The cookies have limits, and they moved forth and back on each element you call on the page, even if its image.
This is not an answer to say "Don't do this", its an answer that I say, you can not do this. You CAN NOT save large amount of data on the cookies due to cookies limitations that are different on each browser.
Use some database to save and retrieve your data. If you continue with trying to save large text on the cookies, your clients will end up with blank pages and no one know where this bug come from.
On this page there is a tool to test the cookie limits: http://browsercookielimits.x64.me/
From the above page:
Typically, the following are allowed:
300 cookies in total
4096 bytes per cookie
20 cookies per domain
81920 bytes per domain
Reference: What are the current cookie limits in modern browsers?