1,058 questions
-1 votes
0 answers
61 views
SessionStorage copied to new tab when using <a> with "target=_blank"+"rel=opener", but not when using "Open link in new tab" by right-clicking
I have data stored in sessionStorage and a hyperlink which I want to be able to share it with even if user opens in a new tab. If I set "target" attribute to "_blank" and "rel&...
1 vote
3 answers
100 views
Quiz and sessionStorage: How to prevent point accumulation with the 'back' button?
I created a multi-page quiz, and I use the sessionStorage API to calculate the points and display the final score on the last page. Each time, I have a first page with the quiz. <form id="q1&...
0 votes
1 answer
64 views
Is it safe / secure to render raw HTML from `history.state` or `sessionStorage`?
I'm making a fetch request for additional HTML content and rendering it on the page. I need to store this HTML client-side so that on back / forward navigation, the page appears as the user left it - ...
1 vote
2 answers
108 views
Why does the `storage` event exist for `sessionStorage` if it doesn't propagate across tabs?
MDN Web Docs says that "The storage event of the Window interface fires when a storage area (localStorage or sessionStorage) has been modified in the context of another document." However ...
0 votes
1 answer
100 views
How can I conditionally render a React component if a sessionStorage variable does not exist in Next.js?
I have an <Authenticated> component that is used to render all of my authenticated routes. I want to prevent rendering the page until I have checked a token stored in sessionStorage. 'use client'...
1 vote
0 answers
75 views
Angular app not retrieving localStorage/sessionStorage on deep links with current production .htaccess configuration
I'm working on an Angular 18 application that uses localStorage and sessionStorage to store user data. Everything works fine when I access the site using the root URL, like https://www.example.com/. ...
0 votes
1 answer
35 views
Failing to extract an ID from an InnerHTML string segment stored in sessionStorage
The teo lines in the script section of my html page are these ... var mySession = sessionStorage.getItem("catProfile"); var myValue = mySession.getElementByID("catAge"); The ...
0 votes
1 answer
45 views
Handling large amounts of data efficiently in a MEAN stack application while ensuring data consistency can be challenging
I am facing technical issues with handling a large amount of data in my MEAN stack application. To avoid repeatedly calling the API, I have implemented local storage to cache the data. If the same ...
0 votes
1 answer
2k views
How to change Zustand storage from sessionStorage to localStorage or back based on the user selection
I need to be able to change Zustand storage at runtime, is it possible? import { create } from 'zustand' import { persist, createJSONStorage } from 'zustand/middleware' export const useBearStore = ...
0 votes
0 answers
90 views
Is there any way to save the state of an ApexChart chart into session storage and retrive it after page reload?
I'm using Angular 17 with ApexCharts. I would like to save the state of a chart (hidden series, zoom, active/inactive legends etc.) into the session storage, and retrieve it after page reload to show ...
1 vote
0 answers
67 views
Firefox sessionStorage data persists during system restart
SUMMARY. When I test the sessionStorage object (window.sessionStorage) in Firefox I find that its contents persist during a system restart. This is a problem for my client who needs to comply with ...
0 votes
1 answer
1k views
A problem in storage state and dependency features in Playwright
As a learner of playwright, I have a challenge with "dependency" and "storage state" features in playwright. I have two products that seems the login process is different on them. ...
2 votes
1 answer
2k views
Angular 17: mergeApplicationConfig in app.config.server.ts results in initialization of providers imported in app.config.ts
A standalone app generated with Angular 17 CLI imports the app.config.ts into the app.config.server.ts and merges the 2 configurations by default. This results in all providers imported in app.config....
1 vote
1 answer
47 views
Ember.js 5.4 how to update component variable when session store is updated
Ember.js Octane and JavaScript (not TS) I have a service to access the session store. When I add or remove a specific key, I want my top level component to toggle visibility for the nav-bar. I have ...
0 votes
1 answer
251 views
How to get object array from session stored with json.stringify?
I have a class: export class CartItem { productname!: string; quantity!: number; } I store an array of this in session as: cartItems: Array<CartItem> = []; ... ... sessionStorage.setItem(&...