more additions to RANTS - jscancer - Javascript crap (relatively small)
(HTM) git clone git://git.codemadness.org/jscancer
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 53212266cbe4e2266216b7aa9f5ddc6c64b7c818
(DIR) parent 8a5bab6d0d2f2666638b179fdf2f69c42ab32bd8
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 21 Jan 2018 19:49:03 +0100
more additions to RANTS
Diffstat:
M RANT_WEBTIPS | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
---
(DIR) diff --git a/RANT_WEBTIPS b/RANT_WEBTIPS
@@ -69,11 +69,15 @@ Javascript use:
content site there is generally NO reason to use Javascript. As a good test
make sure it is usable in for example lynx(1).
- Use as little Javascript as possible, preferably none.
-- If Javascript is absolutely needed notify the user using the <noscript> tag.
-- Don't use animations, at the very least not in Javascript (difficult to block),
- use CSS animations, gif or webm if you must.
-- Don't use jQuery or frameworks, there is no need to support IE6 (anymore).
-- Make sure links to your content work without Javascript enabled.
+- If Javascript is absolutely needed notify the user using the <noscript> tag
+ and make sure your web page "fallback gracefully".
+- Don't use animations, at the very least not coded in Javascript (difficult to
+ block), use subtle CSS animations, gif or webm if you must. Animations should
+ not be required to serve a functional page.
+- Don't use jQuery or other bloated frameworks, there is no need to support
+ IE6 (anymore).
+- Make sure links to your content work without Javascript enabled: no ugly
+ onclick handlers or event subscriptions.
- Don't use "toggle" menu's, make sure all content is visible without having to
uncollapse it.
- Avoid custom popups or dialogs using Javascript, especially modal dialogs.
@@ -85,7 +89,8 @@ Mobile:
your site in a smaller window. A better way is to serve a specific
mobile-friendly site via a separate space for example a subdomain such as
m.yourdomain or mobile.yourdomain.
-- Don't use "hamburger" menus.
+- Don't use "hamburger" menus: try to have a functional navigation directly
+ visible on your web page..
CSS:
@@ -94,8 +99,8 @@ CSS:
Video / audio:
+- Never use DRM.
- Preferably use open (container) formats such as webm, oggv.
-- Don't use DRM.
- Do not autoplay video and audio, this includes background video/audio:
extremely invasive to the user.
@@ -110,7 +115,8 @@ Websockets:
Cookies / localStorage:
- Try to reduce the amount of cookies, for static content there is no need to
- use them. For logins standard HTTP authentication can be used.
+ use them. For logins Basic HTTP authentication can be used:
+ https://tools.ietf.org/html/rfc2617 (Section 2).
- Don't use Javascript localStorage.