hide onload popup after page second time refresh

I want to hide onload popup after page second time refresh.


<div class='popup'>
<div class='cnt223'>
<button type="button" class="close previous">&times;</button>
<img src="assets/images/homepopup.jpg" alt="image" class="img-responsive"/>
<p class="text-center">
Do You Want To Upgrade Your Profile?
<span style="color:#F00;"><i class="fa fa-exclamation-triangle" style="font-size:16px;"></i>&nbsp;Please Do Not Share Your User ID, Password & OTP To Any One.</span>
 <div id="msform">
  <input type="button" name="cancel" class="previous action-button-previous" value="Remind Me Later" style="width:155px;"/>
                <input type="submit" name="submit" class="previous action-button" value="I Want To Upgrade" style="width:155px;"/>


<script type='text/javascript'>
var overlay = $('<div class="overlay"></div>');
return false;
return false;

Suraiya ParvinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mohan singhWeb developerCommented:
Try this

You can use localstorage. It is easy to understand and use
$(document).ready(function() {
    var isshow = localStorage.getItem('isshow');
    if (isshow== null) {
        localStorage.setItem('isshow', 1);

        // Show popup here

Open in new window

It will show you the popup at first visit of your site.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Suraiya ParvinAuthor Commented:
thank you so much @mohan singh for you answer
mohan singhWeb developerCommented:
Hi @ Suraiya Parvin
above code is working or not

Mohan SIngh
mohan singhWeb developerCommented:
It works good
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.