"Display a modal once per session"
Bootstrap 4.0.0 Snippet by PersianGulf

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div id="PersianGulf-Modal" class="modal fade" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <p class="text-left-side"> <b>PersianGulf forever...</b><br><br> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><b>Agree!<b></button> </div> </div> </div> </div> the Modal runs 1 time in every session.<br/> you can view modal again by remove cookies or view this page in new window.
$(function() { if (typeof Storage != "undefined") { if (!sessionStorage.getItem("done")) { setTimeout(function() { $('#PersianGulf-Modal').modal('show'); }, 400); } sessionStorage.setItem("done", true); } });

Related: See More

Questions / Comments: