Hot answers tagged

25 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 ...
user avatar
  • 8,390
16 votes

Why are there no PUT and DELETE methods on HTML forms?

This is was raised in 2010 as Bug 10671 consider adding support for PUT and DELETE as form methods. There was a moderate amount of pushback for this "feature" and some heavy-handedness but eventually ...
user avatar
15 votes

Why html entity names for characters like ¥ € ¢ © ®

Those entities were created in the first place for two reasons: Originally, UTF-8 wasn't that ubiquitous: many HTML files were stored using other encodings which easily led to problems when you had ...
user avatar
14 votes
Accepted

Is automatically generating passwords during registration a good idea?

The problem is that a password should appear in plain text as rarely as possible. In your case, the password appears in plain text in an e-mail. This has several drawbacks: If the account of the ...
user avatar
14 votes
Accepted

Is HTML5 XHTML 1.0 compliant?

Is HTML5 at least XHTML 1.0 compliant? No. If you mean in the sense that valid HTML5 is necessarily valid XHTML 1.0, then this plainly untrue: HTML5 permits unclosed tags for many elements, such as ...
user avatar
  • 1,663
12 votes

Is XHTML5 dead or is it just an synonym of HTML5?

HTML5 is a de facto and de jure standard! XHTML is there, as standard also. HTML5 - A vocabulary and associated APIs for HTML and XHTML W3C Recommendation 28 October 2014 The title of the standard ...
10 votes

Why were frames removed in HTML5, but not iFrames?

Framesets are often used in a way where they break the fundamental principle of the Web - that each document has a single URL. This leads to problems with linking, bookmarks, search engines etc. The ...
user avatar
  • 54.7k
9 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 ...
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 ...
user avatar
8 votes
Accepted

Is possible to create and download a video file via JavaScript, only on the client side?

Disclaimer: I haven't done this myself so all the information I am providing is only what I have found by researching In theory, yes it is possible but not easy or practical. Overview So basically ...
user avatar
  • 216
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, ...
user avatar
7 votes
Accepted

Suggested setup for angularJS development in Visual Studio 2013

We had the same choices to make. We decided to : make the whole build process not depend on visual studio. We chose use tools that are considered mainstream in angular development world. This way ...
user avatar
  • 186
7 votes
Accepted

Why do we have to use divs?

Problem 1: White-spaces I believe that this hasn't come up in general. Although, one good reason that this hasn't and probably shouldn't happen is because white-spaces in CSS classes define multiple ...
user avatar
7 votes
Accepted

Why HTML5 got rid of Rich Desktop applications?

I think you answered your own question partly. People are designing applications for browsers and mobile devices. In order to target both, and share code, using HTML5/JS is a very quick approach. ...
user avatar
  • 505
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 ...
user avatar
  • 161
6 votes
Accepted

Should I mark what blocks mean in data-* attributes?

Use a class. A class labels the contents on it if you work semantically. That you can use a CSS selector on it is, of course, also good and useful, but in general it describes the role of the element,...
user avatar
  • 2,574
6 votes

Is HTML5 XHTML 1.0 compliant?

HTML5 has an XML serialization, which is exactly the same elements and semantics as HTML5, just with an XML compliant syntax. XHTML5 is not exactly XHTML 1.0 compliant, but it is better than XHTML 1....
user avatar
  • 54.7k
6 votes
Accepted

The future of application cache in HTML 5

why is this simple, useful and relatively new technology is being canned? Because it ... ... seemed to be a good idea because it allowed you to specify assets to cache really easily. However, ...
user avatar
  • 13.2k
5 votes

Why are there no PUT and DELETE methods on HTML forms?

History I think it's worth mentioning the first appearance of html forms in the RFC1866 (Section 8.1). Here the method attribute is defined as the following: METHOD selects a method ...
user avatar
  • 179
5 votes
Accepted

Does HTML 5 undercut the need for a full-featured Javascript framework?

It depends quite a bit on the complexity of your application. But the general advantage in using a framework is that they generally target all major browsers, and are quite backward-compatible. ...
user avatar
  • 546
5 votes

why are iframe-s so useful in HTML5 WYSIWIG applications?

Isolation By having the editor inside an iFrame it is guaranteed to be isolated from the page it is used in. The containing page can have Javascript, CSS, HTML tags,... that might interfere with the ...
user avatar
  • 6,232
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.
user avatar
  • 1,727
4 votes

Why is Web SQL database deprecated?

The reality is that the contributing parties reached an impasse on the direction of the standard. In short, no one could agree. The W3C site explains this. The specification reached an impasse: ...
user avatar
  • 149
4 votes
Accepted

How does contenteditable work?

The first part - data:text/html - is a Data URI that tells the browser that what follows is html, and it should parse it. The second part - <html contenteditable> - is the actual html, an ...
user avatar
  • 39.1k
4 votes
Accepted

Should we use any JS framework which makes HTML as scripting language

Logic is often present in HTML templates on the client side because it makes sense to have it there. The logic contained within is not business logic, but simple conditionals and loops for controlling ...
user avatar
  • 5,956
4 votes

Should I mark what blocks mean in data-* attributes?

The current HTML5 spec (PR) says about custom data attributes (emphasis mine): Custom data attributes are intended to store custom data private to the page or application, for which there are no ...
user avatar
  • 1,022
4 votes

Why use iFrames in a web application?

It's just easier, and a pragmatic solution. iFrame keeps everything in it's own semi-private window, so there's little risk of CSS or JS conflicts. Not the greatest for user experience, but simple ...
user avatar
  • 141
4 votes

Understand SGML and HTML

From HTML 2.0 to HTML 4.01, HTML was nominally defined as an SGML application, as described in the quotation from the HTML 4.01 spec. It was never implemented that way. At least there has never been ...
user avatar
4 votes
Accepted

Semantics of heading levels in multiple sections in HTML5

If you are always using sectioning elements (wherever they are needed), it doesn’t matter which heading element (h1-h6) you choose. The outline algorithm "calculates" the correct heading rank, which ...
user avatar
  • 1,022

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