Click here to Skip to main content
15,913,722 members
Everything / LocalStorage

LocalStorage

LocalStorage

Great Reads

by Gerd Wagner
We show how to deal with key-value pairs and how to manage a key-value store using JavaScript's localStorage API.
by Florian Rappl
Building a full featured (and fun-packed) single-player game out of the box.

Latest Articles

by Gerd Wagner
We show how to deal with key-value pairs and how to manage a key-value store using JavaScript's localStorage API.
by Florian Rappl
Building a full featured (and fun-packed) single-player game out of the box.

All Articles

Sort by Score

LocalStorage 

16 Sep 2015 by Sergey Alexandrovich Kryukov
One way to preserve some file from modifications or deletion, regardless of privileges, is to keep it permanently open in some process, for non-shared access (which is the default). To keep this state permanent, the code should also be executed permanently, which is possible if this process is...
16 Sep 2015 by F-ES Sitecore
You can't create files that can't be deleted or else viruses would be impossible to get rid of. If the user wants to delete those files then your app stops working (or you can re-create fresh copies), that's their decision.
27 May 2014 by Peter Leow
Refer: offline web application[^]
9 Jan 2015 by ssharma21
Hi Guys,I am working on a portal which has two option as links-1) high contrast color2) reset to defaultFor this I have made two css-- one for default colors and other for high contrast colors.I want when a user click on any option that option will work for all the pages till he...
8 Oct 2018 by F-ES Sitecore
You can't do this for security reasons. You can only access local items\cookies etc that belong to the same site your code is running on and the port number is a part of that identification so to your browser localhost:80 and localhost:8080 might as well be www.google.com and www.facebook.com,...
14 May 2019 by Gerd Wagner
We show how to deal with key-value pairs and how to manage a key-value store using JavaScript's localStorage API.
7 Dec 2020 by Richard Deeming
Window.localStorage - Web APIs | MDN[^] const colors = ["#ad9ea1", "#8e96a3", "#94a899", "#cfc5b6", "#91919c", "#b3b4b5"]; let colorIndex = parseInt(localStorage.getItem("colorIndex")) || 0; const updateColor = function() { ...
16 May 2021 by Chris Copeland
The reason it's restoring the previous entries is because your method to remove doesn't update the parent myFavoriteFoodsArray, it only updates a local array called food. Then in the form submit handler you append the new food item onto the...
20 May 2012 by Lakhwant
I have stored some data in the session in my application and now I want to use local storage to store that data.Is it possible to access local storage into C# code so that I can replace session usage by local storage.ThanksLakhwant
30 May 2012 by ♥…ЯҠ…♥
I usually open through mstsc.exe in run command,After googling several times i found that we can share the local machine folder using the mstsc.exe command. 1) Type mstsc.exe in Run Command 2) Select your remote server(that you intended to connect) in the dropdownlist box 3)...
12 Feb 2013 by Harshal Jumle
I have a WCF service through it i need to sync the webserver database with the local database in my WP7
27 Jun 2013 by 143dero
I am building a mobile aplication using jquery mobile and jquery for backend and i want to do local storage,how can i do it while i pick data from the from jquery mobile form to local storage
19 Mar 2014 by StephanCassel
Dear software developers,A WinForm application using WebBrowser control that is hosting html5 webapp. It use two HTML5 features:1. Application Cache 2. Local Storage Application Cache works perfect. The Local Storage does not work. (typeof(Storage) == "undefined")When...
19 Mar 2014 by gggustafson
I don't think it's what you want to hear, but Does web browser controls support local storage,application cache,... may supply some insight.Hope that helps.
20 Mar 2014 by StephanCassel
Thanks for all reply. Local Storage works very well via WebBrowser Control. It was an Ajax bug that caused the error. xmlHttp.send(null) executed offline made the application (WebBrowser control) to crash completely.Thanks again for your tips Stephan
1 May 2014 by Coder93
how can i store array of array in localstorage which are different in size?
1 May 2014 by Sergey Alexandrovich Kryukov
The local storage is based on name/value pairs, like all associative containers in Javascript (essentially all Javascript object, including arrays, are such associative arrays):http://en.wikipedia.org/wiki/JavaScript#Dynamic[^],http://en.wikipedia.org/wiki/Associative_arrays[^].Please...
6 May 2014 by Sergey Alexandrovich Kryukov
Thank you for the clarification.The exception is unrelated to localStorate; you are trying to use it correctly.The exception is thrown by JSON.strignify. This type of serialization does not support data graphs with circular references (some technologies, such as .NET Data Contract handle...
14 May 2014 by Member 10790982
I need a simple solution for the following issue:Currently at work we are tasked with reviewing new products and approving them (products being various electronic components for traffic signals). If a product is approved it gets maunually entered into a database (currently using Microsoft...
27 May 2014 by Sergejack
Is there a way to make a web served HTML5 page available offline?I'd like somebody to be able to connect once to the website, then be able to reopen the web page even if he's not connected to internet anymore.The website would as you might have guessed be an app.I'd like to avoid...
1 Jul 2014 by tvelop
Context: I have a web forms application using the Entity Framework to store objects in the SQL Server Express LocalDB. To work offline on a mobile client´s browser, i use a manifest file and need to synchronize the stored data.Approach: I could use the local storage of a mobile browser,...
1 Jul 2014 by Thomas Nielsen - getCore
I recommend you play around with Web API, that's really the easiest thing in Microsoft worldhttp://channel9.msdn.com/Events/aspConf/aspConf/Introduction-to-the-ASP-NET-Web-API[^]It would be a bit like lerning to fish as opposed to just getting one ... you shouldn't opt for a quick...
4 Sep 2014 by Member 10941024
I want to store a localStorage value only once. If it exists in localStorage,an alert appear.
28 Oct 2014 by bhagirathimfs
May be you are using External JS and CSS file and giving wrong path in the root page.You can use below code. @import...
8 Jan 2015 by Sergey Alexandrovich Kryukov
Alternatively, consider this:http://learn.jquery.com/jquery-ui/theming[^],http://jqueryui.com/themeroller[^].—SA
12 Jan 2015 by Herman<T>.Instance
See: Here[^]. NOT supported by XP
15 Mar 2015 by kubibay
We have an asp.net project which adds and plays video files(.mp4) for users. It is ok to upload videos to any web server and play from there. But the problem is how can we play the video files which are located at the user's network storage or cloud storage which is not a web server? Is the only...
18 Mar 2015 by kubibay
Here is the solution;C# Customizable Embedded HTTPServer[^]
17 Jun 2015 by E.F. Nijboer
You have several options. For example cookies can be used to store data between pages (or same page) even when refreshed. You only need to store the start time of the timer. You can calculate the time between from the current time minus the start time. So it will have the correct countdown...
20 Oct 2015 by Petri Kolmonen
Hello, We have a need to use IndexedDb for Offline usage of our applications. Our applications are related with map solutions. Maps are created by using OpenLayer. We need to store not only a map itself but also geodata. Maps are vector based and can be as big size as 100-300 Mb. Is that a...
20 Oct 2015 by Kornfeld Eliyahu Peter
Different browsers have different restrictions on indexedDB...Firefox - has no actual description, but storing larger than 50MB will cause the browser to ask the end user to agreement...IE - it has some restrictions even in the API (not all supported), and also data can be up to 250 MB for...
4 May 2016 by Member 12503094
Is there really a way how can my android apps call user input data from localstorage to the calendar (my current calendar plugin is fullCalendar)The example story for my problem is like this: "The user fill in the form provided and then all the user input will be saved on the localstorage....
20 Aug 2018 by veena nair
What I have tried:I am trying to write an html page that add values from local storage and show it on jsgrid(Lightweight Grid jQuery Plugin - jsGrid[^]) including sorting . but i am not able do it. the grid itself is not showing on the web page. can any one help methis is the code which...
2 Jun 2017 by Member 13237994
We are building a solution for field technicians that utilize Apple iPhones out in the field to track data for installations at assigned sites. The iPhone is running a custom-built application that field techs utilize to view their list of assigned installations for the day. They can also log...
31 Jul 2017 by Member 13257242
Hello! I am trying to display a variable. People click on an image to pick a Pokemon (Charmander, Bulbasaur, or Squirtle), and it will take them to a page called battle.html and they will be able to pick more Pokemon with the coins they have. The code I am using for saving the pokemon chosen is ...
31 Jul 2017 by Thomas Daniels
From your updated code, these two lines are important: var pokemonchosen; localStorage.setItem('pokemonchosen', pokemonchosen); pokemonchosen is undefined after that first line, but never gets a value. So the second highlighted line stores undefined into localStorage. And that's not very...
12 Nov 2017 by Member 13507633
Hey guys and girls,for the past couple of days i am really struggeling to implement localstorage. For some reason i cannot get it working ( that is probably because i dont understand how it works ) I want to host a static html page and the input must be saved. here is my code:
12 Nov 2017 by Karthik_Mahalingam
check the correction var titelopslaan = document.getElementById("tekst2"); var opslaan = localStorage[titelopslaan]; // Check browser support if (typeof (Storage) !== "undefined") { // Store debugger var value =...
22 May 2018 by Member 13839547
My code is designed to create multiple school announcements; one may be regarding the Basketball Team, the other Kingsmen Club team... Whenever a new announcement's information is went through arrays of things like the announcements description, name, room number; it just replaces the old one...
20 Aug 2018 by Member 10986884
Please remove ` ` from your code. jsgrid will not support ` `.
8 Oct 2018 by Ayrton Yagami
Good morning people. I'm having a little problem. I'm working with two servers, IIS and Tomcat. On the IIS server I have an Iframe that shows the pages that are on the Tomcat server. The big problem is that I can not store data in Tomcat's LocalStorage, which is on port 8080. How can I send...
23 Jan 2019 by Member 14127706
I have a simple text submit field on one page. The goal is to have users type in a location and hit submit then go to a landing page with a Mapbox map and have it center or zoom to that location. I tried passing the address from local storage with a variable - get local storage item and setting...
12 Nov 2020 by h311o
Recently I wanted to make a functionality where if the user has added a product to cart, then it will be stored in the Local Storage. I tried to implement this in my Product.jsx file. And this is the code I used to make the product stored in...
17 Nov 2020 by h311o
I tried to do the 'save product to the cart's local storage' functionality by myself, but I had a LOT of trouble implementing it, as you can see in my last question. So I've reset everything back to what is what before I implemented this,...
7 Dec 2020 by K 8260
I followed a YouTube tutorial to create a button on my website – when you click the button, the background color changes. However, this change does not remain when the page is refreshed or when another page is visited. I have tried to save this...
16 May 2021 by Galarist_00
I am trying to make a to-do list project and storing the tasks locally. I can save data locally to the browser but when I am trying to remove a task and then adding a new task then the previously removed tasks will be re-added again. What I have...
17 Jun 2021 by warlordsw
I'm new in React and state hooks.I'm trying to make a website about creating booklist and save it to local storage. Also uploading image to cloudinary. My problem is ; when i trying to save cloudinary image url to the localstorage, it saves...
27 Sep 2021 by Member 15341738
I am trying to create a calculator in React, with an output field updating once user inputs one of the values. It has to be within a class. class CreateProjectAlter extends React.Component { render() { const { classes } = this.props; ...
27 Sep 2021 by saiche nouh
the question is not clear , you wanna a calculator that shows an output updated once you update the input ? is that your question?
27 Sep 2021 by saiche nouh
import "./styles.css"; import {useState} from "react"; export default function App() { const [input1 , setInput1] = useState(1); const [input2 , setInput2] = useState(1); const [output , setOutput] = useState(1); return (
11 Jun 2022 by Ayesha Tassaduq
Hi I am a beginner in python and I am working on the blockchain I want to store any hash that creates by any transaction. I want to transfer that hash to a local database. Can anyone tell me how can I do that? Here is my code. can anyone give me...
11 Jun 2022 by Richard MacCutchan
In your client code you have the following at line 12: sock.sendall(bytes(data,"utf-8")) But you have not declared data, or created any information to send.
11 Jun 2022 by Richard MacCutchan
You already posted this question at Python :need help in blockchain code and store or transfer hashes on a local database[^]. Please do not repost.
17 Aug 2023 by OriginalGriff
Storing anything like that client side means cookies - and that means two things: 1) you need to get permission first, just like every other site that won't shut up until you let them store cookies on your machine. 2) It's not particularly...
19 Aug 2023 by Muhammed Muflih
I'm working on a React project where I need to store logged-in user information, such as their name, avatar, user_id, and more, on the client side. I'm looking for advice on the best practices and techniques for achieving this securely and...
14 Feb 2012 by Florian Rappl
Building a full featured (and fun-packed) single-player game out of the box.
29 May 2012 by OriginalGriff
I do it all the time, and copy/paste or drag drop works all the time, provided the remote machine is on the same local network. If it is not - accessed via the internet, say - then I use FTP. Try getting a copy of FileZilla client[^] - it should help as it provides a drag-and-drop FTP interface.
19 Mar 2015 by Richard Deeming
No. The server cannot control where a file is saved on the client. If it could, that would be a significant security hole in the browser.
8 Jan 2015 by Sergey Alexandrovich Kryukov
And how this can be related to local storage or sessions?[EDIT #2]Actually, after OP raised the valid and practically important problem of applying style switch to other pages using only the client-side techniques, I can see that local and/or session storage using respective HTML5...
4 Apr 2019 by ♥…ЯҠ…♥
I usually work on remote machine which is present in another cabin. Some times i used to download a file in that remote machine, then i try to move that file to my local machine. To move the file i tried these 1) I copied the file from the remote server and try pasting the file in local ...
12 Jan 2015 by Andrea Feduzzi
I've created an application with visual studio c# and I've used an localDB.When I start the application in computer with windows XP, 7 or 8 ( after installation of SQL Server 2014 LocalDB Express from this web site:...
11 Nov 2020 by Sandeep Mewara
How have you defined products is still not clear. I can just guess that its initialized as null in your component and that is causing an error. map works only on arrays. So, check products is defined array before doing map on it. Try this and...
20 May 2012 by Mehdi Gholam
Local storage is a browser based technology accessible via javascript. Try the following for c# : http://stackoverflow.com/questions/7301611/retrieve-data-from-browser-local-storage-using-c-sharp[^]
1 Dec 2013 by Thanks7872
First of all,every road has two ends,you can not go through both at one time,did you get it?Well,offline itself means that forget about server as you don't have access to it,so encryption can't take place in this case. You can not perform any server activities.Secondly,you can store data...
4 Sep 2014 by kbrandwijk
Check if window.localStorage.getItem('...') is null.
2 Dec 2013 by Sampath Lokuge
You can use one of the below mentioned jquery plugin to do your work.If you need one way encryption,use MD 5 plugin.MD5 Encryption using jQuery This supports both ways (i.e. encryption and decryption):RC4 Symmetric Encryption/DecryptionUPDATEQuote:Final Thoughts on Local...
2 Dec 2013 by akki166786
Our requirements is to persist some of the data on the client side as the part of local storage as we have a need to access our application offline also, but we want that some of those file should be encrypted for some reasons but that encryption and decryption should not be completely on client...
22 Feb 2019 by RajendraKhandekar5525
Team, I am storing & retrieving kendo grid data using localstorage. It's working if the user is log-in. If the user log-out,localstorage data clear. When user clicks on signout, I just clear cookies, but localstorage data automatically clear. I just want to retrieve localstorage data after user...
17 Jun 2015 by Member 11725385
Hello guys, i need a countdown timer with start and stop button. and when i refresh it, it will not restart. it just continue until it reach zero. Please help me. how can i do this? pleas. thank you for answers
23 Jan 2023 by shivay 2023
Books Table CRUD Application using JavaScript table { ...
28 Aug 2013 by Ramkumar K
Please Help me,i have pasted my full js code here..$(function (){ //alert('Im Ready'); var db = openDatabase('Test', '1.0', 'Test', 2 * 1024 * 1024); db.transaction(function (tx) { tx.executeSql('drop table countries '); tx.executeSql('CREATE...
6 May 2014 by Coder93
I want to cache xml DOM of a page in localstorage, I store it in an array and convert it into a json string, but i get this error : "Uncaught TypeError: Converting circular structure to JSON "how can i do this?[EDIT]I load an xml file as follow : xml =...
14 May 2014 by Sergey Alexandrovich Kryukov
The answer is mostly contained in your question. Of course, if you can have ASP.NET hosting, using it would be the best.As to the data storage, even for small volume of data, it's hard to imagine that you have enough experience and resources to develop some alternative to relational...
25 Oct 2014 by Member 11179478
I'm having a bit of trouble trying to get my JSFiddle to display and work properly locally. Heres the fiddle: http://jsfiddle.net/kelseyhisek/8vku6pta/When I save the page source from JSFiddle, the spacing of columns seems off and the JQuery does not work at all.If anyone could help me...
15 Mar 2015 by Rahul Kumar
You can use JW Player to play the video on demand or live stream.Example if your video saved on AWS S3 bucket jwplayer("myElement").setup({ file: "https://s3.amazonaws.com/TestBucket/Video/video.mp4", width: 640, height:...
19 Mar 2015 by kubibay
I want to save an mp4 video link to user's pc's specified local path. Is there any way to do that with asp.net ?
16 Sep 2015 by Umut Comlekcioglu
Hi everyone,I'm developing new software for Windows OS. My application need to create File in Computer LocalAppData and I can do it.But that files should be cannot delete. OrWhat I need to do storage my application files?I'm search to Embedded Resource File, but they cannot...