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 4600386
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:40:37+00:00 2026-05-21T23:40:37+00:00

I am developing an html application that is essentially a series of pages like

  • 0

I am developing an html application that is essentially a series of pages like a book. Within this application, I would like to store several JavaScript variables across pages. Think things like pages read, bookmarks, etc. When this application is viewed over HTTP, I plan to use localStorage with fallbacks for older browsers (globalStorage, userData, etc.).

However, this completely breaks down if the files are accessed via “file://”, for example if viewed off of a CD. It seems that most (if not all) localStorage solutions will not work under the file protocol. Cookies are not an option either under “file://”.

Any ideas on how to persist JavaScript data across html pages when they are being viewed via “file://”?

It really only needs to be available in the current user session. I really don’t want to use frames, but as of yet, I can’t think of another way to accomplish this

  • 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-05-21T23:40:37+00:00Added an answer on May 21, 2026 at 11:40 pm

    A buddy of mine at work helped me out with this problem by sharing his implementation of using window.name to store data across pages of a single window/session.

    A similar implementation (and discussion around the method) can be found here: https://web.archive.org/web/20200203061558/http://ajaxian.com/archives/whats-in-a-windowname

    Preliminary tests I’ve been doing on this method look very promising. I tested this, under the file protocol (loading page from desktop, a.k.a. – "file:\") on the following browsers. It worked on all of them!!

    • IE 6
    • IE 7
    • IE 8
    • IE 9
    • FF 3.6
    • FF 4
    • Chrome 11
    • Opera 10
    • Safari 4

    I have not yet done any testing as to how much data you can store here, but the internets seem to agree on a value of 2 MB.

    Sources, links, more information

    • JavaScript Programmer’s Reference (Google Books)
    • Cookie-less Session Variables in JavaScript – Sitepoint Article
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application that displays images. I would like to display
I'm developing a JavaScript application that uses several open source JavaScript projects. All their
I have this ajax web application I am developing that essentially calls the google
I started developing an application in Silverlight that was dealing with downloading the HTML
I am developing an application with sdk 3.1 - html/javascript/scenes. i have an iframe
I am developing an android application, that should open html 5 file when it
I am developing a web-based javascript/html application with a sister firefox-extension. The application's page-javascript
I am developing an application using html and javascript. I have a ui-scrolllistview on
Hi I'm developing an application with HTML and javascript (jquery), the HTML has a
I'm developing an application that uses ubiquity-xforms. Previously I had been serving the pages

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.