How to load wordpress sidebar using AJAX [duplicate]

Just go ahead and use a CSS media query to set the sidebar to display: none if the screen is too small, and provide your mobile users with some JavaScript that lets them selectively view it if they want to. Don’t worry about the loss in bit-and-cycle efficiency this causes; assuming that you get no more than one tenth the number of daily hits that Facebook does, and that your sidebar isn’t full of large auto-play video files, the gain from sending the sidebar on a separate request will be negligible (or even possibly negative.

tech