Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8835549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:17:05+00:00 2026-06-14T09:17:05+00:00

I have the following script: I want my app to access and remember for

  • 0

I have the following script:
I want my app to access and remember for the second launch one of this pages:
This is how I tried but it’s not working.

<script>
if (localStorage.getItem("0") === null) {
//do nothing 
}
else if(localStorage.getItem("1")===null{
}
else if(localStorage.getItem("2")===null{
}
else if(localStorage.getItem("3")===null{
}
else if(localStorage.getItem("0") !==null){
window.location = "cosmote.html"
}
else if(localStorage.getItem("1") !==null){
window.location = "germanos.html"
}
else if(localStorage.getItem("2") !==null){
window.location = "zapp.html"
}
else if(localStorage.getItem("3") !==null){
window.location = "sunlight.html"
}
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:17:07+00:00Added an answer on June 14, 2026 at 9:17 am

    Would you not be better, sotring the last page value in one local storage area?

    Then doing one call e.g localStorage.getItem("lastPage");

    Then doing a switch or if else again, this will save mutliple accesses to local storage.

    This will make it more efficent and readable, or if this isnt the case at least use an object and a value for each page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following script that works well in Firefox and Chrome (not sure
I have the following powershell script which loads a custom .NET DLL this contains
I'm using this script by Fedor but I want a little difference: When both
I have the following script that I want the production guys to execute using
I have the following korn script: #!/bin/ksh TAPPDATADIR=/hp/qa02/App/IPHSLDI/Data echo $TAPPDATADIR if [[ls $TAPPDATADIR/zip_file_MD5_checksum*.txt |
I have following script that executes all the .reg files in the current directory.
I have following small script to preview some text before submitting it to store
I have the following script below where I try to mimic a file upload
I have the following script: (function($) { $.fn.easyPaginate = function(options){ var defaults = {
I have the following script running successfully. However if I try to use a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.