<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
//Cookie
var period = 1; //expiration date
$(function() {
// First time
if ($.cookie('access') == undefined) {
$.cookie('access', 'on', { expires: period });
$(window).on('load', function() {
//
//初回アクセス処理
//
});
// After the second time
} else {
//
//2回目以降の処理
//
}
});