My web app sends data from PHP to javascript as a JSON string.
To avoid writing the string as text in the rendered file, the architecture I thought of using is setting data on cookies with PHP, then reading with JS. It works well so far, but I was thinking if maybe users have cookies disabled, then it won't work.
So I have two questions, one, if users do disable cookies much or if it's ok to use cookies as my data-keeping method.. is there a study about cookie-disabling behaviour? I googled but couldn't find any recend data.
Second, is there another way to send data from PHP (I'm using laravel) to javascript without having to write it out on the file? (I can't make another ajax request to the server and then load the data, as it would kill user interaction, the data must return with the first request)
Thanks