We help IT Professionals succeed at work.
Get Started

Run JS only once (check IE version)

602 Views
Last Modified: 2013-12-08
I saw an article (click here) which discussed how to check the version of IE a user is using.

On my website I want to basically (1) check their IE version (IF they are using IE), then (2) if it's < version 7 alert them with a message. This block of code should go on every page. (I put it in <body onload="check_version();"> ).

But I only want the alert to show up 1 time ONLY! So if they visit the website again the message will only show up once (if any) and won't reappear for a while (ie until the browser is restarted etc) I don't want the alert to pop up on every page of the website, though they may navigate the entire site.

How can I do this exactly? I don't know js so detailed code samples are appreciated. Thanks
Comment
Watch Question
Multitechnician
CERTIFIED EXPERT
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE