This question already has an answer here:
I am using responsive design on my website. Everything is fine except for the fact that on a mobile phone, my website is just too long. There is just too much content for a mobile screen - too much vertical space gets taken up by the sidebar which contains a lot of widgets like popular posts and recent comments and many others. To make the website smaller, I want the sidebar to not load at all if viewed from a small screen. And I don't want to apply display:hidden to the sidebar container. That would be stupid.
So the most efficient way would be to load the sidebar using AJAX and exclude it if the viewport is less than 800px wide.
Could anybody please tell me if this possible? If this can be done please give some examples and links to some tutorials. I have googled a lot for this but found just one tutorial which I think is not enough as I want to learn from several examples.