Most voted "localstorage" questions
The Localstorage object stores data locally and makes it available to any window/tab. Data in Localstorage is maintained even if the browser is closed, which is removed only by the application that defined it, or manually by the user.
Learn more…122 questions
Sort by count of
-
1
votes2
answers204
viewsI’m not getting to work with localStorage
I have the following javascript code: const player1 = "X"; const player2 = "O"; var playTime = player1; var gameOver = false; var pontuacaoX = 0; var pontuacaoO = 0; var chaveX = 'scoreX'; var…
-
1
votes1
answer82
viewsStore "do not show again" with localStorage
I have a div which can be hidden by clicking a button: $(".fechar").click(function(){ $("#mensagem").hide(); }); <script…
-
1
votes3
answers61
viewsDoubt with Localstorage -
I have this code that is counting the amount of Clicks, only I wish that when closing the Browser the counter does not reset. var p = document.createElement("p"); document.body.appendChild(p);…
-
1
votes1
answer63
viewsIonic 3 Missing Localstorage
I have an Ionic 1 application that saves some information in the Torage locale. I rewrote the same application in Ionic 3 with the same package id(widget id in config.xml), but when installing the…
-
1
votes2
answers48
viewsxmlhttprequest native function does not overwrite by passing user token in header
I’m having a hard time getting my function to overwrite the native xmlhttprequest function so that it always passes a header containing the user token that is contained in my Localstorage Currently…
-
1
votes5
answers2183
viewsSave items and recover values with Localstorage
Good morning, everyone. I have a stroller where I record items for an estimate. Until then I can record this item in the cart in the localStorage and persist this data in this same item, the user…
-
1
votes1
answer860
viewsreactjs - Maximum update Depth exceeded
I am creating a dynamic table, in which I save the row information in the localStorage. To render the table, I give a getItem in localStorage, a setRows on a map in the variable rows. const [rows,…
-
1
votes1
answer86
viewsValidate form attributes and submit data with Jquery
Hello, everyone! I’m making a Javascript and Jquery API application, using localstorage to store the data. I inserted some validation attributes in the inputs (required and Pattern) and inserted the…
-
1
votes2
answers152
viewsHow do I store these values in the Torage locale?
I’m putting together a very simple system that makes simple counts. I need these values to remain written in HTML after the page is reloaded, I just haven’t learned yet how to manipulate the…
-
1
votes1
answer37
viewsKeep the last change in input saved in the browser
When you click the button it changes the background of the BODY tag, I need that when reload the page it keeps the color that was selected before, I think with localstorage work but I don’t…
-
1
votes1
answer106
viewsUpdate/Edit JSON in localStorage() with Java Script
I’m developing an app for annotations in Javascript, and would like to edit an annotation saved in JSON on localStorage. This my code is returning only 1 (one) single object and overwrite the others…
-
0
votes1
answer288
viewsError trying to use HTML5 Local Storage
I’m studying about local Storage in HTML5 and JS, understanding that its purpose is to store texts in the local Storage of browser. When testing, I got JS errors. I’d like to understand better why:…
-
0
votes0
answers105
viewsWhy does a query with localStorage variable not work?
I am making a system in PHP where the user should choose some parameters and then get results as restricted as possible. For this I store the first variable using the LocalStorage in Javascript and…
-
0
votes1
answer44
viewsGet Websql values when loading the page through Javascript
When I load the page even the function getChamadasFromDay() starting after loading the variables total_time and total_calls continue with the value zero. note that the variable total_time and total…
-
0
votes2
answers307
viewsLocalstorage doesn’t keep names with accents?
My Ionic app stores user data, as a name, in localStorage. I went for a test, logged in my wife’s name, Flávia, but when I looked at the console in the Resources tab, the name field was null and the…
-
0
votes1
answer323
viewsProblem getting user data in the application’s localStorage
Guys I would like to implement a menu "my account" in my project, this menu should show the user data as name, email etc, I am using jwt and the logged in user data can be obtained in Localstorage…
-
0
votes1
answer310
viewsHow to convert time in string to time from Ionic to PHP with Mysql?
Good morning guys, I am passing to the server a string that would be for time: 23:45 is an example. In my $_GET I’m trying to convert this way: $prazo_entrega_min = time("hh:mm",…
-
0
votes1
answer526
viewsSetar localStorage in different Omains
I have three applications: 1. Login (which runs on door 8080) with jQuery very simple 2. API (wheel at port 4000) with Nodejs 3. Web (rotating at port 4200) with Angular When I am logged in and…
-
0
votes0
answers93
viewsSet as checked a checkbox recovered from Localstorage
Guys I have a table that each product has the same add-ons and are chosen from a checkbox. Then I check with this function when refresh which were chosen and put checked but because they have extras…
-
0
votes1
answer423
viewsForm validation and localstorage
Good night. I am two days trying to validate a form that will save the data of the user registration in the browser localstorage. I received part of the code ready, the problem is that the form…
-
0
votes1
answer281
viewsActive menu after refresh with localStorage
I have this code that makes the menu active and expands. <li class="menu-item"> <a href="#" class"active"> <span>Posts</span> </a> <ul class="sub-menu">…
-
0
votes1
answer3027
viewsHow to add localstorage in Typescript (Angular 6)
I have a code in Typescript (angular 6) in which I for educational reasons, want to know how to save various message variables with the following data in cache: adicionarMensagem(preparacao:…
-
0
votes1
answer64
viewsngModel does not change Ionic 2’s Toggle
I have a toggle that enables and disables a function, it already works, what does not work is the state of Toggle in the View, toggle is always activated even with ngmodel=false. code below: View:…
-
0
votes0
answers296
viewsStore offline image in Ionic Storage
Hello, I created an application with a simple user registration and storing in the Ionic Storage, however I would like to know how to store an image to be the profile photo of the user My Provider…
-
0
votes1
answer38
viewsRemove Whitespace in Array
Well, I’m developing an app with Ionic 3. When I try to record some data in the array, it appears " n" at the beginning and end of the array. Follow the code : element = this.pedido.produto; if…
-
0
votes1
answer346
viewsThe localStorage function does not work
I have this code: localStorage.setItem("name", "pedro"); Only when I see application/Local Storage/File is not created Key nor the Value and gives me an error: test.html:13 Uncaught Domexception:…
-
0
votes1
answer474
viewsAdd multiple products in one sessionStorage
I add the product through a select, but when I try to add another it erases what is in the sessionStorage current. How do I add the two? I have the select in html that brings the product, and when…
-
0
votes1
answer85
viewsSave click on localStorage
I have a simple button that when clicked its text changes - and when clicked again it goes back to the previous text. So: <button class="texto">texto 1</button> <scprit>…
-
0
votes0
answers272
viewsRelationship local tablesStorage Ionic 3
I want to make a relationship between two "tables" in Ionic 3 with Localsotrage. I created a preview with the first that would be the movement register: import { Injectable } from '@angular/core';…
-
0
votes2
answers149
viewshow to create a "Store list"?
Each time the user clicked on the button, I would like you to save the information to a localStorage different and tried to do with for, and increment 1 every time you click the button, like this:…
-
0
votes2
answers132
viewsMy value is replaced in Localstorage
I’m trying to add data to Localstorage through a form. However, it always replaces the value and does not appear the key I had determined (it is as 1). In this code snippet is when it takes the user…
-
0
votes1
answer966
viewsDelete from localStorage
I’m a beginner in the js area and I’m developing a code that stores the data in a table and saves in localStorage, I need that when I click the delete button that appears in this table, the line is…
-
0
votes1
answer81
viewsDelete the clicked image from the Storage location
Basically I made a system to favorite images by clicking to save in Storage location. let favorites = JSON.parse(localStorage.getItem('favorites')) || [] localStorage.setItem('favorites',…
-
0
votes1
answer83
viewsLoad a window only once after reloading the site in Asp.net C#
Having this window when accessing a website for the first time, how do I only appear once even after reloading the website or the user goes back to the home page and does not reappear this?…
-
0
votes1
answer67
viewsStorage firebase in android studio
I’m starting programming for android and I have a project in android studio that creates registration with photo, I added firebase and not how to create the code to send this data with photo,…
-
0
votes1
answer41
viewsHelp using setItem and getItem from localStorage
I’m trying to save an answer, but I’m not getting it every time I refresh the previous answer back. Follow what I’m trying to implement: <!DOCTYPE html> <html lang="pt-BR"> <head>…
-
0
votes1
answer6560
viewsLocalstorage + PHP
I am capturing the data from a Localstorage, but when I put the information in a PHP variable and search on the server, the query does not perform correctly. <?php session_start(); try{…
-
0
votes1
answer145
viewsHow to pass data from one screen to another with Native Localstorage and Ionic 3?
I would like to know how to pass data from one item to a form in another view, using Ionic 3’s Native Localstorage. I created a preview as shown below: import { Injectable } from '@angular/core';…
-
0
votes2
answers570
viewsSave data in Localstorage and then check if it exists in another page
Good afternoon person. I need to save a data in Localstorage and then check if this value exists on another page, I tried here but it didn’t work. First I define the value of the "variable" Prof_amc…
-
0
votes0
answers684
viewsHow to remove an index from localStorage
I need to make a manipulation of localStorage and I don’t know how to remove an item from an index. I’m very beginner in the subject and I don’t know how to pass this information to the button.…
-
0
votes1
answer194
viewsRecover data from localStorage to a list
Good morning, I am developing an app with Ionic 3 and I have the following situation : I am recording a list of products in the Store, after that, I need to bring the recorded data, for a list of…
-
0
votes2
answers147
viewsChange the style/theme of the site and store it in Localstorage
I have a theme change system on my blog, but it has some problems, like, it can’t change the style of a div.class added by jquery (addClass) or pseudo elements styles (after/before/active etc) and…
-
0
votes1
answer196
viewsUpdate array value with IONIC Storage
I am using Storage to store my order data as per the image below: I need to check if the request (numped) exists before saving, if it exists update its data, if not I add new request. However my…
-
0
votes0
answers1273
viewssaving authentication data in localStorage React js
I am developing an application in Reactjs and using Axios to work with requests and need to keep user data saved in localStorage, but something is missing in my code, as this giving Undefined in the…
-
0
votes1
answer119
viewsStoring multi-button status on localStorage
Friends, I have the following situation: I have a list with a button on each line, they serve to define a status. When clicked change from "waiting" to "received" and is saved in localStorage.…
-
0
votes2
answers239
viewsChecklist using checkbox, javascript and Localstorage
I have this simple Checklist that I created, using checkbox, javascript and Localstorage It’s working, but how to make it more practical and more lean? function check1() { var check1status =…
-
0
votes0
answers70
viewsOffline web push notifiion
I’m creating a list to, and in it, I want to be able to create pre-programmed notifications. The application persists all data in Local Storage, IE, you do not have to use a push notification server…
javascript localstorage push-notification service-workerasked 5 years, 3 months ago Costamilam 9,556 -
0
votes1
answer401
viewsFile Path in project
I have a project where I need to develop a billing request, I am implementing a spreadsheet import for DB Mysql, until this part is OK, the problem is that I can’t find the file inside the folder…
-
0
votes1
answer201
viewsView sessionStorage data in a div
I am doing an activity that consists of recording data obtained from a form in the sessionStorage with the Register button, and with the Display button, show the recorded data. I cannot show this…
-
0
votes1
answer828
viewsHow to use Localstorage in a functional React component
How can I use Localstorage in this case the way I did works only with class component Error that appears is: Typeerror: repositories is not a Function export default function Main() { const…