I have some experience when it comes to CodeIgniter. I am trying to figure out a method for determining the window size of a browser and assign it POST or $this or the user session (also part of $this). I need the variable to persist for the session.
In my site there is a table of data that needs to be formatted differently for width greater than 768px. By trial and error, I have tried different methods using CSS media queries but there is no way around it: I need to know, server-side, what the browser window width is so I can execute code in my controller send it along with all other HTML to the view.
I did consider the User Agent class but that will only inform me as to whether the device might be mobile, not the browser window width.
Is there a simple way to accomplish this?