I use the following Javascript to get two equal height columns:
var height = Math.max($(".sidebar").height(), $(".content").height());
$(".sidebar").height(height);
$(".content").height(height);
Basically this is working fine only 50% of the time i need to press F5 to refresh the page to make thes divs indeed equal height. Is there something I can do about that or do you guys recommend a different method to make equal height columns?
Yes just use css and display:table and display:table-cell (or use flexbox). There is no need for JS and indeed js makes the page very slow if you are throttling the resize event.
Of course it depends on your page and whether the columns you are resizing are related or not. In my experience there has never been a need to use js to equalise columns since 2003.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet sem sed libero
bibendum tempus faucibus quis mi. Nulla rhoncus vel ipsum in volutpat. Nam tortor nibh,
posuere ac lorem ut, suscipit tincidunt leo. Duis interdum justo ac justo vehicula consequat.
Curabitur et volutpat nibh. Phasellus rutrum lacus at dolor placerat feugiat. Morbi porta,
sapien nec molestie molestie, odio magna vestibulum lorem, vitae feugiat est leo sit amet
nunc. Curabitur ornare tempor turpis. In nibh sem, porta ac magna sed, pretium commodo
odio. Sed porttitor augue velit, quis placerat diam sodales ac. Curabitur vitae porta ex.
Praesent rutrum ex fringilla tellus tincidunt interdum. Proin molestie lectus consectetur
purus aliquam porttitor. Fusce ac nisi ac magna scelerisque finibus a vitae sem.