Skip to main content
32 votes

How is localStorage different from indexedDB?

@yannis answer is excellent. Just want to add a couple of things. In a few situations, like Service Workers, you cannot use blocking code, hence, you cannot use localStorage, and must use something ...
user949300's user avatar
  • 8,869
16 votes

How is localStorage different from indexedDB?

For me, I found that I can store blobs in IndexedDB while in localStorage I can store strings only. It is mean that IndexdDB is better for binary data like images, audio, video. Yes we can store ...
Vitaly Zdanevich's user avatar
9 votes
Accepted

Are tables inside tables a good idea in the right circumstance

Semantic HTML is about accurately describing the semantic structure of your document. If your document contains tabular data, then use a table. If your document contains tabular data which is itself ...
Jörg W Mittag's user avatar
8 votes

How can a html 5 game made licensed?

The usual solution is to put part of your game logic on a server somewhere and have your game communicate with it using AJAX or similar. In the server code you can check for license keys. In short, ...
Dan Pichelman's user avatar
6 votes

can two web browser tabs be distinguished in a single-page application?

Session storage is tab specific (i.e. not shared across tabs). So you can check session storage for a given key value, create it if it doesn't exist, and include it in any requests you send to your ...
Jeff Lambert's user avatar
6 votes

HTML5 localStorage and encrypted sensitive data

I'm looking for a way to have a website remember sensitive data, but without actually storing it server side. Use the server to store encrypted data, there is no reason to use localStorage. It is ...
Yeti's user avatar
  • 161
5 votes

Is there any situation where there is a good reason to use an anchor <a> element without a href attribute?

In the old days, you used <a name="whatever"> if you wanted another link to jump to a particular point on the screen. Nowadays (for a long time actually) we use the "id" attribute.
Rory Hunter's user avatar
  • 1,747
4 votes

Is there any situation where there is a good reason to use an anchor <a> element without a href attribute?

You could imagine that some Javascript code is dynamically changing the DOM to add that missing href= attribute dynamically at runtime.
Basile Starynkevitch's user avatar
4 votes

Why was Google Maps built using canvas? If it was built today, would it have rather used react/angular? Why (not)?

Any map based application will use Canvas, SVG or WebGL for actually drawing the map and it is orthogonal to using Angular or even page being SPA at all. Look at frameworks like https://openlayers.org/...
user158037's user avatar
4 votes

synchronize HTML5 or JavaScript video to realtime?

Anytime you need to synchronize devices, you want one central controller instructing the devices what to do. This is just as true for mobile phones playing a video as it is the lights. I know one ...
Greg Burghardt's user avatar
3 votes
Accepted

What are the points of apps like Sketch and Photoshop when it comes to Web Development?

Web design consists of two aspects: designing a site, and implementing it. You are used doing both together, but it can often be sensible to separate them. For example, you might use a wireframe to ...
amon's user avatar
  • 135k
3 votes

Prefixing a number with + on html inputs

That depends on: The purpose of the input field. What an User expect the page. (User Experience standpoint) Lets discuss an example: For an e-shop page does not make sense to deal with negative ...
linuxunil's user avatar
  • 1,451
3 votes

Are there standards for handling card swipers in applications?

Not really, no. At least, not outside of the fact that there are three tracks to read from, and each has a maximum number of bytes they can hold. While there are standards that are followed, it's ...
Cypher's user avatar
  • 124
3 votes
Accepted

Are there good reasons for avoiding the use of semantic HTML markup?

Using semantic markup has a number of advantages: We get sensible default styles for many things like emphasis or tables or links. We get a number of user-interface elements with pre-built appearance ...
amon's user avatar
  • 135k
3 votes
Accepted

Help settle an argument: article element usage question

I think the spec is pretty clear: The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently ...
Jörg W Mittag's user avatar
2 votes

Why is Web SQL database deprecated?

Just posting to let you know that just because WebSQL is deprecated/removed/unsupported in all the crappy browsers, you don't need to use IndexedDb. You can use SQLite via WebAssembly or JS-...
Quandary's user avatar
  • 393
2 votes

System architecture design advice

You might want to think about creating a Progressive Web App(PWA). It is a web page that has some functionality of an app when it comes to limited to now connectivity. You can run it on a desktop ...
DFord's user avatar
  • 1,240
2 votes
Accepted

can two web browser tabs be distinguished in a single-page application?

You may create a unique ID (for example a UUID) at the client or let the server create it (and send it to the client at some occasion). Each request at which the server needs to discern the ...
Hero Wanders's user avatar
  • 1,077
2 votes
Accepted

Using the symbol ⎋ to denote any "escape" in Javascript, CSS, HTML etc

The name of the escape key and the phrase "escape character" are certainly linked, but I think you are stretching the definition to cover your use case. The "escape" key on keyboards is so called ...
IMSoP's user avatar
  • 5,877
2 votes

Using the symbol ⎋ to denote any "escape" in Javascript, CSS, HTML etc

A keyboard provides symbols. It is up to the software running on the computer to interpret them and respond with an action. The original intent of the Escape key is basically the same as the purpose ...
Martin Maat's user avatar
  • 18.5k
1 vote

Using the symbol ⎋ to denote any "escape" in Javascript, CSS, HTML etc

Re-thinking my approach (included for the sake of completeness): After reflecting on @Bart van Ingen Schenau's comment: This is the first time I encountered the ⎋ symbol in my forty-odd years. and ...
Rounin's user avatar
  • 285
1 vote
Accepted

Storing session state in browser's local storage

Almost everything is a balancing act between performance, usability, maintainability. That said... What's the difference between storing session state on the client versus the server? Where ...
TZHX's user avatar
  • 5,072
1 vote

Best practices for positioning elements in an HTML-based game

It'd be nice if this used some kind of grid-based system so that it would automatically scale to arbitrary window sizes without the program manually calculating pixel widths and so forth. Tetris ...
Rounin's user avatar
  • 285
1 vote

can two web browser tabs be distinguished in a single-page application?

Scopes (lifetimes) Request scope all info is give as request parameters Session scope a session is maintained, probably by cookie Application scope (irrelevant) info is maintained globally For ...
Joop Eggen's user avatar
  • 2,059
1 vote

Direction for Token Authentication Scheme in C#

Ok so that's basically a session token. Apart for your 'app wide dictionary' which will eat memory and crash your server at some level of users. The problem with your scheme is how to you integrate ...
Ewan's user avatar
  • 77.1k
1 vote

Are there good reasons for avoiding the use of semantic HTML markup?

The div element is a generic one that can be used for anything. With styling, one can produce the same visual output as any other element. However, browsers come with their own default styling and you ...
Rob's user avatar
  • 709
1 vote

Is there a way to use html5 custom elements without javascript?

Unfortunately, custom elements were not designed to be created with html-only syntax1. They were created with the idea to change the DOM on the fly and add your own elements by javascript only.
Jiehong's user avatar
  • 11
1 vote

Abstraction in Cordova

Separate the concerns of readable code files and application files made to perform better. You can separate your working code from the actual files used in your app. Manage all your html code in ...
JeffO's user avatar
  • 36.8k
1 vote

Is there any situation where there is a good reason to use an anchor <a> element without a href attribute?

W3Schools.com says: In HTML 4.01, the tag could be either a hyperlink or an anchor. In HTML5, the tag is always a hyperlink, but if it has no href attribute, it is only a placeholder for a ...
GlenPeterson's user avatar
  • 14.9k
1 vote
Accepted

Concept to differentiate between html tags and angle brackets

I know it has been a while since I asked this question, but we have found a solution to this problem in March of this year. I am just now filling all of you in. Our C# code handles this senerio by ...
EightyFour's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible