<script>
$(document).ready( function() {
    var height = $(window).height();
    var width = $(window).width();
    $.post('index.php',{'width': width,'height':height,'recordSize':true},function(response) {
       $("body").html(response);
    });

});
</script>
<?php
if(isset($_POST['recordSize']) && $_POST['recordSize']) {
	$_SESSION['screen_height'] = $_POST['height'];
	$_SESSION['screen_width'] = $_POST['width'];

	if($_SESSION['screen_width']>1024) {
		include "include/slider-nivo1.php";
	}
}
?>
session start yapıldığını ve jquery in çağırıldığını varsayarak kodlamanız genel olarak doğru fakat bunu tam olarak ne için nasıl kullanacağınızı anlayamadım