Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "localstorage"
Why not list other things? "We don't store your IP-address"-popup? Or "We use HTML"-popup?15
I'M BACK TO MY WEBDEV ADVENTURES GUYS! IT TOOK ME LIKE 4 MONTHS TO STOP BEING SO FUCKING DEPRESSED SO I CAN ACTUALLY STAND TO WORK ON IT AGAIN
I learned that the linear gradient looks cool as FUCK. Honestly not too fond of the colors I have right now, but I just wanted to have something there cause I can change it later. The page has evolved a bunch from my original concept.
The URL bar changed into a full command bar (writing the functions for the commands now, also used to config smaller things, such as the user@hostname part, maybe colors, weather data for city and API key, etc)....also it can open URLs and subreddits (that part works flawlessly). The bar uses a regex to detect if it's a legit URL (even added shit so I don't need http:// or https://), and if it's not, just search using duckduckgo (maybe I'll add a config option there too for search engines).
At this very moment it doesn't even take a second to fully load. It fetches weather data from openweathermap, parses it, and displays it, then displays the "user" name grabbing a localstorage value.
I'm considering adding a sidebar with links (configurable obviously, I want everything to be dynamic, so someone else could use my page if they wanted), but I'm not too sure about it.
It's not on git yet because I was waiting until I get some shit finished today before I commit. From the picture, I want to know if anyone has any suggestions for it. Also note that I am NOT a designer. I can't design for shit.13
Time for one of those eye-rolling super vague general question threads 🙃 How do you find edge cases when you're testing your code?
Reason I'm asking is I'll spend AGES testing something I've built, then it goes in for review and IMMEDIATELY the person reviewing it finds some daft edge case I would have never thought to look for.
Current theory is that I'm testing it too much from a developer's perspective (does this request get issued, does localStorage get updated, etc etc) and not enough from a user's perspective (what does this button do) but even then these edge cases keep popping up and it's really annoying 🙃
Who's got some insights?6
Okay, mine is actually mildly interesting.
I was, at the time, obsessed with operating systems. The only thing I knew how to do (and I only knew how to do it poorly!) was make websites. And thus, Frames(TM) was born.
It was really labored for what it was. The whole thing worked off iframes to create different "Windows" which you could drag around the screen in a typical window-based environment. It had a start menu (Without search - I wasn't that good yet), task bar, background image, the whole 9 yards.
Some highlights from that project:
- Not hosted anywhere. Everything was file:/// protocol
- Originally, everything was statically created, and I learned about document.createElement during this project
- To communicate between the "Operating system" and the different frames, I used localStorage, which was continuously exec'ing anything it could find. Smart smart boi.
- Of course, the only thing available was web storage. The "Hard drive" was about 5MB, and if you cleared browsing data, goodbye everything!
Hours and hours happily dumped into that project, but I am definitely happy it is gone forever.
You may say "Yeah it sucks but cmon it's just one topic and it can't be that hard". No. It's a fucking mess that deserves no mercy, and your passive attitude is the reason making cookies is the way it is now.
The problem stems from the fact that there's only document.cookie. That's it. It's not like document.getElementById where you can use functions like .classList or .style or whatever. Why can't it be like this:
// Add cookie. Take notice at how easily you can add multiple cookies
document.cookie.add("key=value; key=value", "expires=UTC", "path=/")
// Store the value of a cookie in a variable
let x = document.cookie.call("key");
// Delete cookie
"Wow, you knows how to hack the system"
Me: Well... I was one of the creators of that system...
Me inside: Please don't use localStorage ever again1
So past week our Web Design teacher proposed a little HTML5 project for the class to make. I have been since that day until today trying to implement an OBLIGATORY drag and drop functionality to reorder a list and back it up to localStorage, but for some reason it wont work as it should. But what a surprise, today I arrive at class and he has changed the specifications of the project, allowing us to not implement that, or implement it differently. That singlehandledly made my day.2
thanks to @olback i learned about localStorage today. excited me started to implement this. after half of the refactoring was done i had the brilliant idea to test it with the intended ie11 after everything was fine with firefox. only to find out localStorage is not supported for local sites.
Here we go. GDPR(?) again.
Don't know where to ask this kind of stuff, SO is prolly too much and from my experience, you guys here always gave the best answers to stuff..
I'm currently working on a website as a project for finals (it's called Maturita/SOČ here :/) and it's supposed to be a dasboard where teachers can add some info about upcoming stuff and shit like that. Few things: No frameworks, just JS, PWA and Firebase. I've been hearing a lot of stuff about GDPR that I should comply with it and so on.
Here's the question: It's PWA and the data is currently stored in localStorage and planning to sync it to Firebase. What I store is name of the school, few URLs they enter in and the information they provide, like the upcoming events and such. Should I worry about GDPR in this case, and if so, what can I do?11
So I'm looking for a tutorial somewhere to manage auth with react.
I have passport local setup with jwt in express, but looking to manage users in the front-end, managing the user state app wide, logging out, protected routes etc.
I've done some searching around but I can't see anything to concrete. Any pointers or articles would be great.
I was thinking of localStorage but not sure how to go about setting that up with react.3
How Microsoft expect anyone to develop using any technology they introduce with so many limitations.
Moi a Microsoft dumb enthusiast said to myself : hey dude you are a developer stop whining about the app gap bust a move create decent array of apps and release them, went into a full project management mode wrote requirements did sketches and some prototypes, time to execute.
1. first app: image files organizer, viewer , with some light editor capabilities and album creator after some work i came to discover that you don't have a proper file system APIs to show a folder tree view in my app "WTF" there are work arounds and dirty solutions but seriously? i can only access the stupid media folders created by Microsoft and that's it.
so i ditched the apps until uwp become a development tools with target audience other than kids who eat crayons, and while using "Edge" i thought to my self : "you know what dude extensions are cool and if you do something like a speed dial it would be awesome"
fire up my text editor started writing my extension to discover that:
"you cannot use localStorage from local HTML files".
moral of the story
MS is failing with consumers not because people hate MS but rather MS hates itself like no engineer over there said to him self this is fking stupid ?
other limitations :
no proper system tray access
no registry access what so ever
and i have started 2 days ago.
yeah Ms this is the main app gap problem the uwp sucks big time. compared to android Java which has a great access to every aspect of the device even apple provide better APIs for their systems.
if uwp is MS future then rip MS.
please i stand corrected if anyone knows better.2
Since my question, in all likelihood, won't get answered on StackOverflow, I hope I can ask it here instead. I hope that's alright.
So, I am currently developing a Feathers + Nuxt boilerplate, and am using localStorage to store the jwt.
But I noticed if I set the localStorage with the jwt manually, it will act as if I'm logged in, bypassing the entire login-function. So I solved this by using an iframe with a script that clears localStorage (and log out the user, if logged in) when something changes in the localStorage (by using the eventListener "storage"). (I am also observing the iFrame if someone deletes it, in the console, and re-inserts itself).
My question is if this would carry any security risks? Like, would this be a bad thing to do, security wise? Is it alright to leave it alone and let users/visitors to set the jwt manually?9
Just finished connecting my task manager (to-do list basically)using(angularjs,php)to my back end(it used localstorage previously now uses php and MySQL) now I can login ,register new users,create new tasks, set as priority.