Layout need to refresh to appear correctly

when i clear history data and refresh my web page, it load image slower and the layout is not appear correctly. and if I refresh again, it render correctly.

any idea to solve this problem? thanks.

I have fixed the problem by not to let the html element render twice. I remove some min-height, remove uncertainty height of some elements by giving fixed height and it works.