title
stringlengths
2
136
text
stringlengths
20
75.4k
Game development
Game development ================ Gaming is one of the most popular computer activities. New technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web browser. Develop web games ----------------- Welcome to the MDN game development center! In this area of the site, we provide resources for web developers wanting to develop games. You will find many useful tutorials and technique articles in the main menu on the left, so feel free to explore. We've also included a reference section so you can easily find information about all the most common APIs used in game development. **Note:** Creating games on the web draws on a number of core web technologies such as HTML, CSS, and JavaScript. The Learning Area is a good place to go to get started with the basics. Port native games to the Web ----------------------------- If you are a native developer (for example writing games in C++), and you are interested in how you can port your games over to the Web, you should learn more about our Emscripten tool — this is an LLVM to JavaScript compiler, which takes LLVM bytecode (e.g. generated from C/C++ using Clang, or from another language) and compiles that into asm.js, which can be run on the Web. To get started, see: * About Emscripten for an introduction including high-level details. * Download and Install for installing the toolchain. * Emscripten Tutorial for a tutorial to teach you how to get started. Examples -------- For a list of web game examples, see our list of Tutorials. See also -------- Build New Games A collaborative site featuring a large number of open web game development tutorials. Has not been very active recently, but still holds some nice resources. Creative JS A collection of impressive JavaScript techniques and experiments, not specific to games, but helpful nonetheless. Has not been very active recently, but still holds some nice resources. Game Programming Patterns An online book, written by Bob Nystrom, which discusses programming patterns in the context of game development with the aim of helping game developers produce more effective and efficient code. Gamedev.js Weekly Weekly newsletter about HTML game development, sent every Friday. Contains the latest articles, tutorials, tools, and resources. HTML5 Game Engine List of the most popular HTML game frameworks along with their rating, features and samples. JSBreakouts Compare JavaScript Breakout clones in different frameworks to help you choose the right one for you. Tuts+ Game Development Tutorials and articles about game development in general. HTML5 Gamedev Starter Starter for the new game developers, a curated list of links to various useful resources around the web. js13kGames JavaScript coding competition for HTML game developers with the file size limit set to 13 kilobytes. All the submitted games are available in a readable form on GitHub. Mozilla Hacks Blog Games category on the Mozilla Hacks blog containing interesting gamedev related articles. Games section on wiki.mozilla.org A wiki page with information about Mozilla's involvement in platform games.
Web-related technologies
Web-related technologies ======================== This section of the site is a home for documentation on web-related technologies that aren't central to the MDN's remit (i.e. they aren't web standards technologies), but are nonetheless related to the web and of interest to web developers. **Note:** These documentation resources generally aren't maintained by the MDN writer's team — if you have suggestions or queries related to these resources, check out the landing pages for those technologies for contact details of the relevant maintenance team. Technology list --------------- IMSC: subtitles and captioning for the Web IMSC (TTML Profiles for Internet Media Subtitles and Captions) is a file format for representing subtitles and captions. It uses XML to describe content, timing, layout, and styling. IMSC is very similar to HTML and CSS in concept — in fact, most IMSC styles have a direct equivalent in CSS.
Learn web development
Learn web development ===================== Welcome to the MDN learning area. This set of articles aims to guide complete beginners to web development with all that they need to start coding websites. The aim of this area of MDN is not to take you from "beginner" to "expert" but to take you from "beginner" to "comfortable." From there, you should be able to start making your way, learning from the rest of MDN, and other intermediate to advanced resources that assume a lot of previous knowledge. If you are a complete beginner, web development can be challenging — we will hold your hand and provide enough detail for you to feel comfortable and learn the topics properly. You should feel at home whether you are a student learning web development (on your own or as part of a class), a teacher looking for class materials, a hobbyist, or someone who just wants to understand more about how web technologies work. #### Looking to become a front-end web developer? We have put together a course that includes all the essential information you need to work towards your goal. **Get started** Where to start -------------- Complete beginner If you are a complete beginner to web development, we'd recommend that you start by working through our Getting started with the web module, which provides a practical introduction to web development. Beyond the basics If you have a bit of knowledge already, the next step is to learn HTML and CSS in detail: start with our Introduction to HTML module and move on to our CSS first steps module. Moving onto scripting If you are comfortable with HTML and CSS already, or you are mainly interested in coding, you'll want to move on to JavaScript or server-side development. Begin with our JavaScript first steps and Server-side first steps modules. Frameworks and tooling After mastering the essentials of vanilla HTML, CSS, and JavaScript, you should learn about client-side web development tools, and then consider digging into client-side JavaScript frameworks, and server-side website programming. **Note:** Our glossary provides terminology definitions. Besides, if you have a specific question about web development, our Common questions section may have something to help you. Topics covered -------------- The following is a list of all the topics we cover in the MDN learning area. Getting started with the web Provides a practical introduction to web development for complete beginners. HTML — Structuring the web HTML is the language that we use to structure the different parts of our content and define what their meaning or purpose is. This topic teaches HTML in detail. CSS — Styling the web CSS is the language that we use to control our web content's style and layout, as well as adding behavior like animation. This topic provides comprehensive coverage of CSS. JavaScript — Dynamic client-side scripting JavaScript is the scripting language used to add dynamic functionality to web pages. This topic teaches all the essentials needed to become comfortable with writing and understanding JavaScript. Web forms — Working with user data Web forms are a potent tool for interacting with users — most commonly, they are used for collecting data from users, or allowing them to control a user interface. In the articles listed below, we'll cover all the essential aspects of structuring, styling, and interacting with web forms. Accessibility — make the web usable by everyone Accessibility is the practice of making web content available to as many people as possible regardless of disability, device, locale, or other differentiating factors. This topic gives you all you need to know. Web Performance — making websites fast and responsive Web performance is the art of making sure web applications download fast and are responsive to user interaction, regardless of a user's bandwidth, screen size, network, or device capabilities. MathML MathML is the language that we can use to write mathematical formulas in web pages using fractions, scripts, radicals, matrices, integrals, series, etc. This topic covers MathML. Tools and testing This topic covers the tools developers use to facilitate their work, such as cross-browser testing tools, linters, formatters, transformation tools, version control systems, deployment tools, and client-side JavaScript frameworks. Server-side website programming Even if you are concentrating on client-side web development, it is still useful to know how servers and server-side code features work. This topic provides a general introduction to how the server-side works and detailed tutorials showing how to build up a server-side app using two popular frameworks: Django (Python) and Express (Node.js). Tasks and assessments --------------------- In the Learn web development section of MDN, there are many self-contained modules that contain articles, tasks, examples, and assessments for you to complete. Here are some tips on how to get the most out of them. There are two main types of tasks you'll encounter: * "test your skills" tasks, for example in Making decisions in your code — conditionals) * more in-depth **assessments** at the end of some modules (e.g. see Image gallery) For most of these tasks, have a look at the GitHub repos associated with the learning area (most of the files are available in `mdn/learning-area`, some are in [`mdn/css-examples`]https://github.com/mdn/css-examples/tree/main/learn). Each assessment/skill test has an associated marking guide and recommended solution available to help you assess your work. There are patterns that make it easier to find these resources, for example: * The **test your skills** marking guide and resources are available at https://github.com/mdn/learning-area/tree/main/javascript/building-blocks/tasks/conditionals. * The **assessment** marking guide and resources are available at https://github.com/mdn/learning-area/tree/main/javascript/building-blocks/gallery. Getting our code examples ------------------------- The code examples you'll encounter in the Learning Area are all available on GitHub. If you want to copy them all to your computer, the easiest way is to download a ZIP of the latest master code branch. If you prefer to copy the repo in a more flexible way that allows for automatic updates, you can follow the more complex instructions: 1. Install Git on your machine. This is the underlying version control system software that GitHub works on top of. 2. Open your computer's command prompt (Windows) or terminal (Linux, macOS). 3. To copy the learning area repo to a folder called learning-area in the current location your command prompt/terminal is pointing to, use the following command: ```bash git clone https://github.com/mdn/learning-area ``` 4. You can now enter the directory and find the files you are after (either using your Finder/File Explorer or the `cd` command). You can update the `learning-area` repository with any changes made to the master version on GitHub with the following steps: 1. In your command prompt/terminal, go inside the `learning-area` directory using `cd`. For example, if you were in the parent directory: ```bash cd learning-area ``` 2. Update the repository using the following command: ```bash git pull ``` Contact us ---------- If you want to get in touch with us about anything, use the communication channels. We'd like to hear from you about anything you think is wrong or missing on the site, requests for new learning topics, requests for help with items you don't understand, or any other questions or concerns. If you're interested in helping develop/improve the content, take a look at how you can help and get in touch! We are more than happy to talk to you, whether you are a learner, teacher, experienced web developer, or someone else interested in helping to improve the learning experience. See also -------- MDN Blog The MDN blog has articles from the MDN team and guest writers about new developments on the site, HTML, CSS, JavaScript, and other web development news. Mozilla developer newsletter Our newsletter for web developers, which is an excellent resource for all levels of experience. Learn JavaScript An excellent resource for aspiring web developers — Learn JavaScript in an interactive environment, with short lessons and interactive tests, guided by automated assessment. The first 40 lessons are free, and the complete course is available for a small one-time payment. Web demystified A great series of videos explaining web fundamentals, aimed at absolute beginners to web development. Created by Jérémie Patonnier. Codecademy A great interactive site for learning programming languages from scratch. BitDegree Basic coding theory with a gamified learning process. Mainly focused on beginners. Code.org Basic coding theory and practice, primarily aimed at children/complete beginners. freeCodeCamp.org Interactive site with tutorials and projects to learn web development. The Odin Project Features a free and open-source full-stack curriculum, from beginner to advanced. Web literacy map A framework for entry-level web literacy and 21st-century skills, which also provides access to teaching activities sorted by category. Edabit Thousands of interactive JavaScript challenges.
Web technology for developers
Web technology for developers ============================= The open Web presents incredible opportunities for developers. To take full advantage of these technologies, you need to know how to use them. Below you'll find links to our Web technology documentation. Documentation for Web developers -------------------------------- Web Developer Guide The Web Developer Guide provides useful how-to content to help you actually use Web technologies to do what you want or need to do. Tutorials for Web developers Tutorials to take you step-by-step through learning HTML, CSS, JavaScript, and Web APIs. Accessibility Enabling as many people as possible to use websites, even when those people's abilities are limited in some way. Performance Making content as available and interactive as possible, as soon as possible. Security Protecting users from data leaks and data theft, side-channel attacks, and attacks such as cross-site scripting, content injection, and click-jacking. Web technology references ------------------------- Web APIs JavaScript programming APIs you can use to build apps on the Web. HTML HTML provides the fundamental building blocks for structuring Web documents and apps. CSS Cascading Style Sheets are used to describe the appearance of Web documents and apps. JavaScript JavaScript is the Web's native programming language. WebAssembly WebAssembly allows programs written in C, C++, Rust, Swift, C#, Go, and more to run on the Web. Events Events are what you build Web apps to react to; for example, when a Web page finishes loading, or a user selects something, presses a key, resizes a window, submits a form, or pauses a video. HTTP HTTP is the fundamental Internet protocol for fetching documents, stylesheets, scripts, images, videos, fonts, and other resources over the Web — and for sending data back to Web servers. Media Formats, codecs, protocols, APIs, and techniques for embedding and streaming video, audio, and image content in Web documents and apps. SVG Scalable Vector Graphics lets you create images that scale smoothly to any size. MathML MathML lets you display complex mathematical notation on the Web. Web Components Web Components are custom elements that you can define and reuse in your Web apps. WebDriver WebDriver is a browser-automation mechanism for remotely controlling a browser by emulating the actions of a real person using the browser. It's widely used for cross-browser testing of Web apps. Web Extensions Web Extensions are a way for you to give users enhanced capabilities in their browsers — for doing things such as blocking ads and other content, customizing the appearance of pages, and more. Web App Manifests Web App Manifests let you enable users to install Web apps to their device home screens, with aspects such as portrait/landscape screen orientation and display mode (e.g., full screen) pre-set. Progressive Web Apps (PWAs) Progressive Web Apps provide a user experience similar to native mobile apps. Developer tools documentation ----------------------------- Firefox Developer Tools Documentation for the set of web-developer tools built into Firefox. Chrome DevTools Documentation for the set of web-developer tools built into Chrome. Safari Web Inspector Documentation for the set of web-developer tools built into Safari. Edge DevTools Documentation for the set of web-developer tools built into Edge.
The MDN Web Docs project
The MDN Web Docs project ======================== **MDN Web Docs** is free-to-use resource on which we document the open web platform. Our mission is to provide *developers* with the *information* they need to *easily* build projects on the *web platform*. This is the landing page for the MDN Web Docs project itself. Here you'll find guides on how the site works, how we do our documentation, the guidelines and conventions we adhere to, and how you can help. We invite everyone to help! MDN Web Docs is an open-source project and accepts contributions. There are many different tasks you can help with, from the simple (proofreading and correcting typos) to the complex (writing API documentation). To find out how to help, visit our Getting started page. If you want to talk to us and ask questions, join the discussion on the MDN Web Docs chat rooms. Community guidelines These guides help you get started with contributing to MDN Web Docs. They also cover topics such as how you can help with tasks and issues, open discussions, and suggest content. If you need help or want to contact us, you'll find the information here. Writing guidelines These guides provide all the information about how to write for MDN Web Docs. They outline the policies for the type of content we write and the type of content we don't write. You'll also find our writing style guide here, how-to guides to perform various content tasks, and also information about the structure of our different pages. MDN Product Advisory Board The MDN Product Advisory Board's mission is to build collaboration between Mozilla, its documentation team, and the key collaborating organizations that help the MDN community collectively maintain MDN Web Docs.
MDN Web Docs Glossary: Definitions of Web-related terms
MDN Web Docs Glossary: Definitions of Web-related terms ======================================================= Web technologies contain long lists of jargon and abbreviations that are used in documentation and coding. This glossary provides definitions of words and abbreviations you need to know to successfully understand and build for the web. Glossary terms can be selected from the sidebar. **Note:** This glossary is a never-ending work in progress. You can help improve it by writing new entries or by making the existing ones better.
Mozilla
Mozilla ======= The articles below include content about downloading and building Mozilla code. In addition, you'll find helpful articles about how the code works, how to build add-ons for Mozilla applications and the like. Add-onsAdd-ons allow developers to extend and modify the functionality of Firefox. They are written using standard Web technologies - JavaScript, HTML, and CSS - plus some dedicated JavaScript APIs. FirefoxFirefox is Mozilla's popular Web browser, available for multiple platforms including Windows, macOS, and Linux on the desktop and all Android and iOS mobile devices. With broad compatibility, the latest in Web technologies, and powerful development tools, Firefox is a great choice for both Web developers and end users.
WebAssembly
WebAssembly =========== WebAssembly is a type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as C/C++, C# and Rust with a compilation target so that they can run on the web. It is also designed to run alongside JavaScript, allowing both to work together. In a Nutshell ------------- WebAssembly has huge implications for the web platform — it provides a way to run code written in multiple languages on the web at near-native speed, with client apps running on the web that previously couldn't have done so. WebAssembly is designed to complement and run alongside JavaScript — using the WebAssembly JavaScript APIs, you can load WebAssembly modules into a JavaScript app and share functionality between the two. This allows you to take advantage of WebAssembly's performance and power and JavaScript's expressiveness and flexibility in the same app, even if you don't know how to write WebAssembly code. And what's even better is that it is being developed as a web standard via the W3C WebAssembly Working Group and Community Group with active participation from all major browser vendors. Guides ------ WebAssembly concepts Get started by reading the high-level concepts behind WebAssembly — what it is, why it is so useful, how it fits into the web platform (and beyond), and how to use it. Compiling a New C/C++ Module to WebAssembly When you've written code in C/C++, you can then compile it into Wasm using a tool like Emscripten. Let's look at how it works. Compiling an Existing C Module to WebAssembly A core use-case for WebAssembly is to take the existing ecosystem of C libraries and allow developers to use them on the web. Compiling from Rust to WebAssembly If you've written some Rust code, you can compile it into WebAssembly! This tutorial takes you through all you need to know to compile a Rust project to Wasm and use it in an existing web app. Loading and running WebAssembly code After you have a Wasm module, this article covers how to fetch, compile and instantiate it, combining the WebAssembly JavaScript API with the Fetch or XHR APIs. Using the WebAssembly JavaScript API Once you've loaded a Wasm module, you'll want to use it. In this article, we show you how to use WebAssembly via the WebAssembly JavaScript API. Exported WebAssembly functions Exported WebAssembly functions are the JavaScript reflections of WebAssembly functions, which allow calling WebAssembly code from JavaScript. This article describes what they are. Understanding WebAssembly text format This article explains the Wasm text format. This is the low-level textual representation of a Wasm module shown in browser developer tools when debugging. Converting WebAssembly text format to Wasm This article provides a guide on how to convert a WebAssembly module written in text format into a Wasm binary. API reference ------------- WebAssembly instruction reference Reference documentation with interactive samples for the set of WebAssembly operators. WebAssembly JavaScript interface This object acts as the namespace for all WebAssembly-related functionality. `WebAssembly.Global()` A `WebAssembly.Global` object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. This allows dynamic linking of multiple modules. `WebAssembly.Module()` A `WebAssembly.Module` object contains stateless WebAssembly code that has already been compiled by the browser and can be efficiently shared with Workers, and instantiated multiple times. `WebAssembly.Instance()` A `WebAssembly.Instance` object is a stateful, executable instance of a `Module`. `Instance` objects contain all the Exported WebAssembly functions that allow calling into WebAssembly code from JavaScript. `WebAssembly.compile()` The `WebAssembly.compile()` function compiles WebAssembly binary code into a `WebAssembly.Module` object. `WebAssembly.compileStreaming()` The `WebAssembly.compileStreaming()` function compiles a `WebAssembly.Module` directly from a streamed underlying source. `WebAssembly.instantiate()` The `WebAssembly.instantiate()` function allows you to compile and instantiate WebAssembly code. `WebAssembly.instantiateStreaming()` The `WebAssembly.instantiateStreaming()` function is the primary API for compiling and instantiating WebAssembly code, returning both a `Module` and its first `Instance`. `WebAssembly.validate()` The `WebAssembly.validate()` function validates a given typed array of WebAssembly binary code. `WebAssembly.Memory()` A `WebAssembly.Memory` object is a resizable `ArrayBuffer` that holds the raw bytes of memory accessed by an `Instance`. `WebAssembly.Table()` A `WebAssembly.Table` object is a resizable typed array of opaque values, like function references, that are accessed by an `Instance`. `WebAssembly.Tag()` The `WebAssembly.Tag` object defines a type of WebAssembly exception that can be thrown to/from WebAssembly code. `WebAssembly.Exception()` The `WebAssembly.Exception` object represents a runtime exception thrown from WebAssembly to JavaScript, or thrown from JavaScript to a WebAssembly exception handler. `WebAssembly.CompileError()` Creates a new WebAssembly `CompileError` object. `WebAssembly.LinkError()` Creates a new WebAssembly `LinkError` object. `WebAssembly.RuntimeError()` Creates a new WebAssembly `RuntimeError` object. Examples -------- * WASMSobel * See our webassembly-examples repo for a number of other examples. Specifications -------------- | Specification | | --- | | WebAssembly JavaScript Interface | See also -------- * WebAssembly on Mozilla Research * webassembly.org * WebAssembly articles on Mozilla Hacks blog * W3C WebAssembly Community Group * Emscripting a C Library to Wasm
Accessibility - MDN Web Docs Glossary: Definitions of Web-related terms
Accessibility ============= *Web Accessibility* (**A11Y**) refers to best practices for keeping a website usable despite physical and technical restrictions. Web accessibility is formally defined and discussed at the W3C through the Web Accessibility Initiative (WAI). See also -------- * Accessibility resources at MDN * Learn accessibility on MDN * ARIA documentation on MDN * The WAI-ARIA recommendation * Web accessibility on Wikipedia * Web Accessibility In Mind * The W3C Web Accessibility Initiative
Chrome - MDN Web Docs Glossary: Definitions of Web-related terms
Chrome ====== In a browser, the chrome is any visible aspect of a browser aside from the webpages themselves (e.g., toolbars, menu bar, tabs). This is not to be confused with the Google Chrome browser. See also -------- * Browser and GUI Chrome
SPA (Single-page application) - MDN Web Docs Glossary: Definitions of Web-related terms
SPA (Single-page application) ============================= An SPA (Single-page application) is a web app implementation that loads only a single web document, and then updates the body content of that single document via JavaScript APIs such as Fetch when different content is to be shown. This therefore allows users to use websites without loading whole new pages from the server, which can result in performance gains and a more dynamic experience, with some tradeoff disadvantages such as SEO, more effort required to maintain state, implement navigation, and do meaningful performance monitoring. See also -------- * Single-page application (Wikipedia) * Understanding client-side JavaScript frameworks * Glossary + API + AJAX + JavaScript * Popular SPA frameworks: + React + Angular + Vue.JS
Prefetch - MDN Web Docs Glossary: Definitions of Web-related terms
Prefetch ======== Prefetching refers to the practice of speculatively fetching documents or subresources in the background for pages that the user is *likely* to navigate to in the near future. This can significantly reduce the load time for the prefetched page if the user does choose to navigate to it. Prefetching might be used, for example, to fetch the page linked by a "Next" button or its subresources, or a link popup that a user hovers over, or search results. ### Resource prefetching Resources should be prefetched based on how likely it is that they will be needed in a future navigation. Browsers can infer this automatically for some resources, such as the current URL in the address bar. This can be done using `<link rel="prefetch">` (the Speculation Rules API only handles document prefetches for navigations): ```html <link rel="prefetch" href="next.html" /> ``` ### Document prefetching Developers can provide hints to the browser of navigations that should be prefetched in a couple of different ways: `<link rel="prefetch">`: ```html <link rel="prefetch" href="next.html" /> ``` Speculation Rules API prefetch: ```html <script type="speculationrules"> { "prefetch": [ { "source": "list", "urls": ["next.html"] } ] } </script> ``` The Speculation Rules API handles document prefetches for navigations much better than `<link rel="prefetch">`; the former was designed specifically for that purpose whereas the latter has a number of limitations; see `<link rel="prefetch">` for details. ### DNS prefetching DNS prefetching resolves domain names in advance, speeding up load times by reducing the time associated with domain lookup at request time. ```html <link rel="dns-prefetch" href="https://example.com/" /> ``` See also -------- * Speculative loading * prerender * Speculation Rules API
Identifier - MDN Web Docs Glossary: Definitions of Web-related terms
Identifier ========== An **identifier** is a sequence of characters in the code that identifies a variable, function, or property. In most languages, identifiers are case-sensitive and not quoted. In JavaScript, identifiers can contain Unicode letters, `$`, `_`, and digits (0-9), but may not start with a digit. An identifier differs from a string in that a string is data, while an identifier is part of the code. In JavaScript, there is no way to convert identifiers to strings, but sometimes it is possible to parse strings into identifiers. In CSS, there are two identifier data types: `<custom-ident>` and `<dashed-ident>`. The CSS `<ident>` can start with a digit and can contain almost any character, but non-letter/digit ASCII characters such as `"`, `\`, and `*` need to be escaped. Emojis, which are valid as identifiers, do not need to be escaped. See also -------- * Glossary + Scope + string + Unicode * Identifier on Wikipedia
DoS attack - MDN Web Docs Glossary: Definitions of Web-related terms
DoS attack ========== DoS (Denial of Service) is a network attack that prevents legitimate use of server resources by flooding the server with requests. Computers have limited resources, for example computation power or memory. When these are exhausted, the program can freeze or crash, making it unavailable. A DoS attack consists of various techniques to exhaust these resources and make a server or a network unavailable to legitimate users, or at least make the server perform sluggishly. There are also Distributed Denial of Service (DDoS) Attacks in which a multitude of servers are used to exhaust the computing capacity of an attacked computer. ### Types of DoS attack DoS attacks are more of a category than a particular kind of attack. Here is a non-exhaustive list of DoS attack types: * bandwidth attack * service request flood * SYN flooding attack * ICMP flood attack * peer-to-peer attack * permanent DoS attack * application level flood attack See also -------- * Denial-of-service attack on Wikipedia * Denial-of-service on OWASP * DDoS
Slug - MDN Web Docs Glossary: Definitions of Web-related terms
Slug ==== A Slug is the unique identifying part of a web address, typically at the end of the URL. In the context of MDN, it is the portion of the URL following "*<locale>/docs/*". It may also just be the final component when a new document is created under a parent document; for example, this page's slug is `Glossary/Slug` . See also -------- * Choosing titles and slugs
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
Cipher suite ============ A cipher suite is a combination of a key exchange algorithm, authentication method, bulk encryption cipher, and message authentication code. In a cryptosystem like TLS, the client and server must agree on a cipher suite before they can begin communicating securely. A typical cipher suite looks like ECDHE\_RSA\_WITH\_AES\_128\_GCM\_SHA256 or ECDHE-RSA-AES128-GCM-SHA256, indicating: * ECDHE (elliptic curve Diffie-Hellman ephemeral) for key exchange * RSA for authentication * AES-128 as the cipher, with Galois/Counter Mode (GCM) as the block cipher mode of operation * SHA-256 as the hash-based message authentication code (HMAC) See also -------- * Mozilla recommended cipher suite choices for TLS
Canonical order - MDN Web Docs Glossary: Definitions of Web-related terms
Canonical order =============== In CSS, canonical order is used to refer to the order in which separate values need to be specified (or parsed) or are to be serialized as part of a CSS property value. It is defined by the formal syntax of the property and normally refers to the order in which longhand values should be specified as part of a single shorthand value. For example, `background` shorthand property values are made up of several `background-*` longhand properties. The canonical order of those longhand values is defined as 1. `background-image` 2. `background-position` 3. `background-size` 4. `background-repeat` 5. `background-attachment` 6. `background-origin` 7. `background-clip` 8. `background-color` Furthermore, its syntax defines, that if a value for the `background-size` is given, it **must** be specified **after** the value for the `background-position`, separated by a slash. Other values may appear in any order. See also -------- * What does "canonical order" mean with respect to CSS properties? on Stack Overflow provides useful further discussion. * The description of the formal syntax used for CSS values on MDN
Fuzz testing - MDN Web Docs Glossary: Definitions of Web-related terms
Fuzz testing ============ **Fuzzing** is a technique for testing software using automated tools to provide invalid or unexpected input to a program or function in a program, then checking the results to see if the program crashes or otherwise acts inappropriately. This is an important way to ensure that software is stable, reliable, and secure. * Wikipedia: Fuzz testing
URI - MDN Web Docs Glossary: Definitions of Web-related terms
URI === A **URI** *(Uniform Resource Identifier)* is a string that refers to a resource. The most common are URLs, which identify the resource by giving its location on the Web. URNs, by contrast, refer to a resource by a name, in a given namespace, such as the ISBN of a book. See also -------- * URI on Wikipedia * RFC 3986 on URI
Deep copy - MDN Web Docs Glossary: Definitions of Web-related terms
Deep copy ========= A **deep copy** of an object is a copy whose properties do not share the same references (point to the same underlying values) as those of the source object from which the copy was made. As a result, when you change either the source or the copy, you can be assured you're not causing the other object to change too. That behavior contrasts with the behavior of a shallow copy, in which changes to nested properties in the source or the copy may cause the other object to change too. Two objects `o1` and `o2` are *structurally equivalent* if their observed behaviors are the same. These behaviors include: 1. The properties of `o1` and `o2` have the same names in the same order. 2. The values of their properties are structurally equivalent. 3. Their prototype chains are structurally equivalent (although when we deal with structural equivalence, these objects are usually plain objects, meaning they both inherit from `Object.prototype`). Structurally equivalent objects can either be the same object (`o1 === o2`) or *copies* (`o1 !== o2`). Because equivalent primitive values always compare equal, you cannot make copies of them. We can now define deep copies more formally as: 1. They are not the same object (`o1 !== o2`). 2. The properties of `o1` and `o2` have the same names in the same order. 3. The values of their properties are deep copies of each other. 4. Their prototype chains are structurally equivalent. Deep copies may or may not have their prototype chains copied (and often they do not). But two objects with structurally non-equivalent prototype chains (for example, one is an array and the other is a plain object) are never copies of each other. The copy of an object whose properties all have primitive values fits the definition of both a deep copy and a shallow copy. It is somewhat useless to talk about the depth of such a copy, though, because it has no nested properties and we usually talk about deep copying in the context of mutating nested properties. In JavaScript, standard built-in object-copy operations (spread syntax, `Array.prototype.concat()`, `Array.prototype.slice()`, `Array.from()`, `Object.assign()`, and `Object.create()`) do not create deep copies (instead, they create shallow copies). One way to make a deep copy of a JavaScript object, if it can be serialized, is to use `JSON.stringify()` to convert the object to a JSON string, and then `JSON.parse()` to convert the string back into a (completely new) JavaScript object: ```js const ingredientsList = ["noodles", { list: ["eggs", "flour", "water"] }]; const ingredientsListDeepCopy = JSON.parse(JSON.stringify(ingredientsList)); ``` Because a deep copy shares no references with its source object, any changes made to the deep copy do not affect the source object. ```js // Change the value of the 'list' property in ingredientsListDeepCopy. ingredientsListDeepCopy[1].list = ["rice flour", "water"]; // The 'list' property does not change in ingredients\_list. console.log(ingredientsList[1].list); // Array(3) [ "eggs", "flour", "water" ] ``` However, while the object in the code above is simple enough to be serializable, many JavaScript objects are not serializable at all — for example, functions (with closures), Symbols, objects that represent HTML elements in the HTML DOM API, recursive data, and many other cases. Calling `JSON.stringify()` to serialize the objects in those cases will fail. So there's no way to make deep copies of such objects. The web API `structuredClone()` also creates deep copies and has the advantage of allowing transferable objects in the source to be *transferred* to the new copy, rather than just cloned. It also handles more data types, such as `Error`. But note that `structuredClone()` isn't a feature of the JavaScript language itself — instead it's a feature of browsers and other JavaScript hosts that implement web APIs. And calling `structuredClone()` to clone a non-serializable object will fail in the same way that calling `JSON.stringify()` to serialize it will fail. See also -------- * Shallow copy * `window.structuredClone()`
Serialization - MDN Web Docs Glossary: Definitions of Web-related terms
Serialization ============= The process whereby an object or data structure is translated into a format suitable for transfer over a network, or storage (e.g. in an array buffer or file format). In JavaScript, for example, you can serialize an object to a JSON string by calling the function `JSON.stringify()`. CSS values are serialized by calling the function `CSSStyleDeclaration.getPropertyValue()`. See also -------- * Serialization on Wikipedia
Caret - MDN Web Docs Glossary: Definitions of Web-related terms
Caret ===== A **caret** (sometimes called a "text cursor") is an indicator displayed on the screen to indicate where text input will be inserted. Most user interfaces represent the caret using a thin vertical line or a character-sized box that flashes, but this can vary. This point in the text is called the **insertion point**. The word "caret" differentiates the text insertion point from the mouse cursor. On the web, a caret is used to represent the insertion point in `<input>` and `<textarea>` elements, as well as any elements whose `contenteditable` attribute is set, thereby allowing the contents of the element to be edited by the user. See also -------- * Caret navigation on Wikipedia ### CSS related to the caret You can set the color of the caret for a given element's editable content by setting the element's CSS `caret-color` property to the appropriate `<color>` value. ### HTML elements that may present a caret These elements provide text entry fields or boxes and therefore make use of the caret. * `<input type="text">` * `<input type="password">` * `<input type="search">` * `<input type="date">`, `<input type="time">`, and `<input type="datetime-local">` * `<input type="number">`, `<input type="range">` * `<input type="email">`, `<input type="tel">`, and `<input type="url">` * `<textarea>` * Any element with its `contenteditable` attribute set
Lazy load - MDN Web Docs Glossary: Definitions of Web-related terms
Lazy load ========= **Lazy loading** is a strategy that delays the loading of some assets (e.g., images) until they are needed by the user based on the user's activity and navigation pattern; typically, these assets are only loaded when they are scrolled into view. If correctly implemented, this delay in asset loading is seamless to the user experience and might help improve initial load performance, including time to interactive, as fewer assets are required for the page to start working. See also -------- * Lazy loading
Mutable - MDN Web Docs Glossary: Definitions of Web-related terms
Mutable ======= A *mutable* value is one that can be changed without creating an entirely new value. In JavaScript, objects and arrays are mutable by default, but primitive values are not — once a primitive value is created, it cannot be changed, although the variable that holds it may be reassigned. See also -------- * Immutable object on Wikipedia * Immutable
Non-normative - MDN Web Docs Glossary: Definitions of Web-related terms
Non-normative ============= Software specifications often contain information marked as **non-normative** or *informative*, which is provided to help readers understand the specification better, or to show an example or best practice. Non-normative parts of the specification are provided as guidelines, and are not considered part of the formal specification. Sections that contain the official part of the specification are often marked as normative. See also -------- * Description of normative and informative content in WHATWG wiki
Grid Row - MDN Web Docs Glossary: Definitions of Web-related terms
Grid Row ======== A **grid row** is a horizontal track in a CSS Grid Layout, that is the space between two horizontal grid lines. It is defined by the `grid-template-rows` property or in the shorthand `grid` or `grid-template` properties. In addition, rows may be created in the *implicit grid* when items are placed outside of rows created in the *explicit grid*. These rows will be auto sized by default, or can have a size specified with the `grid-auto-rows` property. When working with alignment in CSS Grid Layout, the axis along which rows run is known as the *inline, or row, axis*. See also -------- ### Property reference * `grid-template-rows` * `grid-auto-rows` * `grid` * `grid-template` ### Further reading * CSS Grid Layout Guide: *Basic concepts of grid layout*
RTL (Right to Left) - MDN Web Docs Glossary: Definitions of Web-related terms
RTL (Right to Left) =================== **RTL** (**Right To Left**) is a locale property indicating that text is written from right to left. For example, the `he` locale (for Hebrew) specifies right-to-left. Arabic (`ar`) is another common language written RTL. The opposite of RTL, LTR (Left To Right) is used in other languages, including English (`en`, `en-US`, `en-GB`, etc.), Spanish (`es`), and French (`fr`). See also -------- * MDN Web Docs Glossary + Localization + LTR (Left to Right) + RTL (Right to Left)
IETF - MDN Web Docs Glossary: Definitions of Web-related terms
IETF ==== The Internet Engineering Task Force (**IETF**) is a worldwide organization that drafts specifications governing the mechanisms behind the Internet, especially the TCP/IP or Internet Protocol Suite. The IETF is open, run by volunteers, and sponsored by the Internet Society. See also -------- * Official website
RGB - MDN Web Docs Glossary: Definitions of Web-related terms
RGB === *Red-Green-Blue* (**RGB**) is a color model that represents colors as mixtures of three underlying components (or channels), namely: *red*, *green*, and *blue*. This model describes a color with a sequence of three numbers (typically between 0.0 and 1.0, or between 0 and 255). Each number represents the primary colors' different intensities (or contributions) in determining the final color. Alone an RGB value has no meaning. A color model defines how the three components relate to a color space. Graphically, a point in a three-dimensional grid or cube represents a color. Each dimension (or axis) corresponds to a different channel. The RGB color model is then a *cubic*, or *Cartesian*, coordinate system of the underlying color space. For the web, the underlying color space for an RGB value is *sRGB* (Standard RGB), and each RGB component is a number between 0 and 255. Note that there are other RGB color spaces, like the *Adobe RGB* color space, that can represent a wider gamut of color than the *sRGB* color space. The coordinates in *sRGB* and *Adobe RGB* are different. There are many ways to describe the RGB components of a color. In CSS they can be represented as a single 24-bit integer in hexadecimal notation (for example, `#add8e6` is light blue), or in functional notation, `rgb()` as three separate numbers between 0 and 255 (for example, `rgb(46 139.5 87)`). There are also the `srgb`, `srgb-linear`, `a98-rgb`, and `prophoto-rgb` color spaces for the `color()` function. RGB is not the only color model that can represent the *sRGB* color space. Cylindrical coordinate systems like the `HSL` (*hue-saturation-lightness*) or `HWB` (*hue-whiteness-blackness*) color models are also used to represent a sRGB color on the web. See also -------- * RGB color model on Wikipedia * sRGB color space on Wikipedia * Adobe RGB color space on Wikipedia * CSS data type: <color>
Prototype-based programming - MDN Web Docs Glossary: Definitions of Web-related terms
Prototype-based programming =========================== **Prototype-based programming** is a style of object-oriented programming in which classes are not explicitly defined, but rather derived by adding properties and methods to an instance of another class or, less frequently, adding them to an empty object. In simple words: this type of style allows the creation of an object without first defining its class. See also -------- * Prototype-based programming on Wikipedia
Hotlink - MDN Web Docs Glossary: Definitions of Web-related terms
Hotlink ======= A **hotlink** (also known as an **inline link**) is an object (typically an image) directly linked to from another site. For example, an image hosted on site1.com is shown directly on site2.com. The practice is frowned upon, as it can cause unwanted bandwidth usage on the website hosting the linked-to object. From an ethical standpoint, it could be considered stealing when done without permission. See also -------- * Hotlink on Wikipedia * Hyperlink (Glossary)
Promise - MDN Web Docs Glossary: Definitions of Web-related terms
Promise ======= A **`Promise`** is an object that's returned by a function that has not yet completed its work. The promise literally represents a promise made by the function that it will eventually return a result through the promise object. When the called function finishes its work asynchronously, a function on the promise object called a resolution (or fulfillment, or completion) handler is called to let the original caller know that the task is complete. See also -------- * Futures and promises * `Promise` in the JavaScript Reference. * Using promises
Local scope - MDN Web Docs Glossary: Definitions of Web-related terms
Local scope =========== Local scope is a characteristic of variables that makes them local (i.e., the variable name is only bound to its value within a scope which is not the global scope). See also -------- * Scope on Wikipedia
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
SQL Injection ============= SQL injection takes advantage of Web apps that fail to validate user input. Hackers can maliciously pass SQL commands through the Web app for execution by a backend database. SQL injection can gain unauthorized access to a database or to retrieve information directly from the database. Many data breaches are due to SQL injection. ![Pie chart of most common vulnerabilities: SQL Injection is responsible for 50% of vulnerabilities, Cross Site Scripting is responsible for 42% of vulnerabilities, Source Code Disclosure is responsible for 7% of vulnerabilities.](/en-US/docs/Glossary/SQL_Injection/sql_inj_xss.gif) How It Works ------------ ![Screenshot of the login form with username and password fields](/en-US/docs/Glossary/SQL_Injection/updates_loginscreen.png) After entering username and password, behind the GUI the SQL queries work as follows: ```sql "SELECT Count(\*) FROM Users WHERE Username=' " + txt.User.Text+" ' AND Password=' "+ txt.Password.Text+" ' "; ``` Now suppose User enters the Username: admin and Password: passwd123, so after clicking on the Log in button, SQL query will run as follows: ```sql "SELECT Count(\*) FROM Users WHERE Username=' admin ' AND Password=' passwd123 ' "; ``` If the credentials are correct, then the user is allowed to log in, so it's a very simple (and therefore insecure) mechanism. Hackers use this insecurity to gain unauthorized access. Hackers use a simple string called a Magical String, for example: **Username: *admin*** **Password: *anything 'or'1'='1*** After clicking on the login button, the SQL query will work as follows: ```sql "SELECT Count(\*) FROM Users WHERE Username=' admin ' AND Password=' anything 'or'1'='1 ' "; ``` Just take a closer look at the above query's password section. ``` Password=' anything 'or'1'='1 ' ``` The password is not 'anything', hence password=anything results in FALSE, but '1'='1' is a TRUE statement and hence returns a TRUE value. Finally, due to the OR operator, the value (FALSE OR TRUE) is TRUE, so authentication bypasses successfully. Just due to a simple string (Magical String) the entire database is compromised. How To Prevent -------------- Before executing the queries for the user credentials, make some changes like the following: ```sql $id = $_GET['id'] (1) $id = Stripslashes($id) (2) $id = mysql_real_escape_String($id) ``` So due to (1) each single quote (') in the input string is replaced with double quotes ("), and due to (2) before every (') it adds (/). The revised magical string fails to bypass the authentication, and your database stays secure. See also -------- * SQL injection on Wikipedia * Explanation of SQL injection on OWASP (Open Web Application Security Project)
World Wide Web - MDN Web Docs Glossary: Definitions of Web-related terms
World Wide Web ============== The *World Wide Web*—commonly referred to as **WWW**, **W3**, or **the Web**—is a system of interconnected public webpages accessible through the Internet. The Web is not the same as the Internet: the Web is one of many applications built on top of the Internet. Tim Berners-Lee proposed the architecture of what became known as the World Wide Web. He created the first web server, web browser, and webpage on his computer at the CERN physics research lab in 1990. In 1991, he announced his creation on the alt.hypertext newsgroup, marking the moment the Web was first made public. The system we know today as "the Web" consists of several components: * The **HTTP** protocol governs data transfer between a server and a client. * To access a Web component, a client supplies a unique universal identifier, called a **URL** (uniform resource locator) or URI (uniform resource identifier) (formally called Universal Document Identifier (UDI)). * **HTML** (hypertext markup language) is the most common format for publishing web documents. Linking, or connecting resources through hyperlinks, is a defining concept of the Web, aiding its identity as a collection of connected documents. Soon after inventing the Web, Tim Berners-Lee founded the W3C (World Wide Web Consortium) to standardize and develop the Web further. This consortium consists of core Web interest groups, such as web browser developers, government entities, researchers, and universities. Its mission includes education and outreach. See also -------- * Learn the Web * World Wide Web on Wikipedia * The W3C website
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
Asynchronous ============ The term **asynchronous** refers to two or more objects or events that do not exist or happen at the same time, that is, they are **not** synchronous . When multiple related things happen without any being dependent on the completion of previous happenings, they are asynchronous. In computing, the word "asynchronous" is used in two major contexts, as explained below. In networking and communications -------------------------------- Asynchronous communication is a method of exchanging messages in which the sending, receiving, and processing of each message is not dependent on the sending, receipt, or processing of other messages. In asynchronous communication, each party receives and processes messages when convenient or possible to do so, rather than doing so immediately upon receipt. Additionally, messages may be sent without waiting for acknowledgement, with the understanding that if a problem occurs, the recipient will request corrections or otherwise handle the situation. Email is a type of asynchronous human communication. A sender sends an email. The recipient reads the email and responds to it (or not) at their convenience, not necessarily right away. All parties can continue to send and receive messages at any time. Emails don't have to be scheduled in a particular sequence. In asynchronous software, making a request, such as to a server, does not block other processes while waiting for the response. The software can continue performing other tasks. For example, in promise-based APIs, `Promise` objects are created for long operations. After the operation is complete, the promise is handled. With promises, the software doesn't have to wait for the operation to finish. In software design ------------------ Asynchronous software design expands upon the concept by building code that allows a program to ask that a task be performed alongside the original task (or tasks), without stopping to wait for the task to complete. When the secondary task is completed, the original task is notified using an agreed-upon mechanism so that it knows the work is done, and that the result, if any, is available. There are a number of programming techniques for implementing asynchronous software. See the article Asynchronous JavaScript for an introduction to them. See also -------- * Fetching data from the server (Learning Area) * Synchronous
IDE - MDN Web Docs Glossary: Definitions of Web-related terms
IDE === An Integrated Development Environment (**IDE**) or Interactive Development environment is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger. See also -------- * IDE on Wikipedia
Beacon - MDN Web Docs Glossary: Definitions of Web-related terms
Beacon ====== A web **beacon** is a small object, such as a 1 pixel gif, embedded in markup, used to communicate information back to the web server or to 3rd party servers. Beacons are generally included to provide information about the user for statistical purposes. Beacons are often included within third party scripts for collecting user data, performance metrics and error reporting. There is a W3C Draft Beacon Specification to standardize the beacon as an interface to asynchronously transfer HTTP data from User Agent to a web server prior to page load without negative performance impact. See also -------- * Real User Monitoring (RUM)
WebGL - MDN Web Docs Glossary: Definitions of Web-related terms
WebGL ===== **WebGL** (*Web Graphics Library*) is a JavaScript API that draws interactive 2D and 3D graphics. The Khronos Group maintains WebGL, which is based on OpenGL ES 2.0. You can invoke WebGL within the HTML `<canvas>` element, which provides a rendering surface. All major browsers now support WebGL, but its availability depends also on external factors (e.g. GPU support). See also -------- * WebGL on Wikipedia * Check for WebGL support * WebGL on MDN * Support table for WebGL
Cross-site scripting (XSS) - MDN Web Docs Glossary: Definitions of Web-related terms
Cross-site scripting (XSS) ========================== Cross-site scripting (XSS) is a security exploit which allows an attacker to inject into a website malicious client-side code. This code is executed by the victims and lets the attackers bypass access controls and impersonate users. According to the Open Web Application Security Project, XSS was the seventh most common Web app vulnerability in 2017. These attacks succeed if the Web app does not employ enough validation or encoding. The user's browser cannot detect the malicious script is untrustworthy, and so gives it access to any cookies, session tokens, or other sensitive site-specific information, or lets the malicious script rewrite the HTML content. See also -------- * Type of Attacks: Cross-site scripting (XSS) * Cross-site scripting on Wikipedia * Cross-site scripting on OWASP * Another article about Cross-site scripting
Canvas - MDN Web Docs Glossary: Definitions of Web-related terms
Canvas ====== The **canvas element** is part of HTML5 and allows for dynamic, scriptable rendering of 2D and 3D shapes and bitmap images. It is a low level, procedural model that updates a bitmap and does not have a built-in scene graph. It provides an empty graphic zone on which specific JavaScript APIs can draw (such as Canvas 2D or WebGL). See also -------- * Canvas on Wikipedia * The Canvas tutorial on MDN * The HTML `<canvas>` element on MDN * The Canvas general documentation on MDN * `CanvasRenderingContext2D`: The canvas 2D drawing API * The Canvas 2D API specification
Strict mode - MDN Web Docs Glossary: Definitions of Web-related terms
Strict mode =========== JavaScript's **strict mode** is a way to *opt in* to a restricted variant of JavaScript, thereby implicitly opting-out of "sloppy mode". Strict mode isn't just a subset: it *intentionally* has different semantics from normal code. Strict mode for an entire script is invoked by including the statement `"use strict";` before any other statements. See also -------- * Strict mode * Glossary + Sloppy mode
Breadcrumb - MDN Web Docs Glossary: Definitions of Web-related terms
Breadcrumb ========== A **breadcrumb**, or breadcrumb trail, is a navigational aid that is typically placed between a site's header and the main content, displaying either a hierarchy of the current page in relation to the site's structure, from top level to current page, or a list of the links the user followed to get to the current page, in the order visited. A location breadcrumb for this document might look something like this: MDN > Glossary > Breadcrumb Breadcrumb trails enable users to be aware of their location within a website. This type of navigation, if done correctly, helps users know where they are in a site and how they got there. They can also help a user get back to where they were before and can reduce the number of clicks needed to get to a higher-level page. **Note:** While there's no dedicated semantic HTML element for breadcrumb navigation menus, the `<ol>` element is commonly used to represent their hierarchical structure. See also -------- * Breadcrumb Navigation * Google Search Central: Breadcrumb Structured Data * APG Guide: Breadcrumb Example * Understanding Success Criterion 2.4.8 | W3C Understanding WCAG 2.2 * Understanding Technique 65 | W3C Understanding WCAG 2.2
Reflow - MDN Web Docs Glossary: Definitions of Web-related terms
Reflow ====== **Reflow** happens when a browser recalculates the position and geometry of certain parts of a webpage, such as after an update on an interactive site. This tends to be followed by repainting, which is when the browser redraws the webpage to show the resulting visual updates. See also -------- * Repaint * Minimizing browser reflow on developer.google.com * Understanding Reflow and Repaint in the browser on dev.to (2020)
Operand - MDN Web Docs Glossary: Definitions of Web-related terms
Operand ======= An **operand** is the part of an instruction representing the data manipulated by the operator. For example, when you add two numbers, the numbers are the operand and "+" is the operator. See also -------- * Operand on Wikipedia
Parameter - MDN Web Docs Glossary: Definitions of Web-related terms
Parameter ========= A parameter is a named variable passed into a function. Parameter variables are used to import arguments into functions. For example: ```js function example(parameter) { console.log(parameter); // Output = foo } const argument = "foo"; example(argument); ``` There are two kinds of parameters: input parameters the most common kind; they pass values into functions. Depending on the programming language, input parameters can be passed in several ways (e.g., call-by-value, call-by-address, call-by-reference). output/return parameters primarily return multiple values from a function, but are not recommended since they cause confusion ### Parameters versus arguments Note the difference between *parameters* and *arguments*: * Function parameters are the names listed in the function's definition. * Function arguments are the real values passed to the function. * Parameters are initialized to the values of the arguments supplied. See also -------- * Difference between *parameter* and *argument* on Wikipedia * Function declaration * Function expression
ARIA - MDN Web Docs Glossary: Definitions of Web-related terms
ARIA ==== **ARIA** (*Accessible Rich Internet Applications*) is a W3C specification for adding semantics and other metadata to HTML to cater to users of assistive technology. For example, you could add the attribute `role="alert"` to a `<p>` tag to notify a sight-challenged user that the information is important and time-sensitive (which you might otherwise convey through text color). See also -------- * ARIA roles * ARIA states and properties: `aria-*` attributes * ARIA * ARIA guides * WAI-ARIA specification * WAI-ARIA authoring practices
Document environment - MDN Web Docs Glossary: Definitions of Web-related terms
Document environment ==================== When the JavaScript global environment is a window or an iframe, it is called a *document environment*. A global environment is an environment that doesn't have an outer environment. See also -------- * document environment in the HTML specification
Internet - MDN Web Docs Glossary: Definitions of Web-related terms
Internet ======== The Internet is a worldwide network of networks that uses the Internet protocol suite (also named TCP/IP from its two most important protocols). See also -------- * How the Internet works (introduction for beginners)
Serializable object - MDN Web Docs Glossary: Definitions of Web-related terms
Serializable object =================== **Serializable objects** are objects that can be serialized and later deserialized in any JavaScript environment ("realm"). This allows them to, for example, be stored on disk and later restored, or cloned with `structuredClone()`, or shared between workers using `DedicatedWorkerGlobalScope.postMessage()`. The serialization may not include all the properties and other aspects of the original object. For example, a serialization of a `DOMException` must include the `name` and `message` properties, but whether it includes other properties is implementation dependent. As a result, a deserialized object may not be an identical clone/copy of the original object. The new deserialized object will however be a deep copy, so any properties that were serialized from the original object and then deserialized into the new object will share no references with the original object. In some cases when serializing and deserializing an object, it makes sense to transfer some resources rather than creating a copy. Objects that can be transferred are called Transferable objects. Supported objects ----------------- All primitive values are serializable. Not all objects are serializable objects. The objects that can be serialized are listed in: The structured clone algorithm > Supported types **Note:** Serializable objects are marked up in Web IDL files with the attribute `[Serializable]`.
SVG - MDN Web Docs Glossary: Definitions of Web-related terms
SVG === *Scalable Vector Graphics* (**SVG**) is a 2D vector image format based on an XML syntax. The W3C began work on SVG in the late 1990s, but SVG only became popular when Internet Explorer 9 came out with SVG support. All major browsers now support SVG. Based on an XML syntax, SVG can be styled with CSS and made interactive using JavaScript. HTML allows direct embedding of SVG tags in an HTML document. As a vector image format, SVG graphics can scale infinitely, making them invaluable in responsive design, since you can create interface elements and graphics that scale to any screen size. SVG also provides a useful set of tools, such as clipping, masking, filters, and animations. See also -------- * SVG on Wikipedia * W3.org's SVG Primer * SVG documentation on MDN * Latest SVG specification
EXIF - MDN Web Docs Glossary: Definitions of Web-related terms
EXIF ==== The **Exchangeable Image File Format (EXIF)** is a standard that specifies how metadata about a multimedia file can be embedded within the file. For example, an image might contain EXIF data describing the: pixel width, height, and density, shutter speed, aperture, ISO settings, capture date, etc. See also -------- * EXIF (Wikipedia) * CIPA Standards, including "CIPA DC-008-Translation-2019 Exchangeable image file format for digital still cameras : Exif Version 2.32"
Character encoding - MDN Web Docs Glossary: Definitions of Web-related terms
Character encoding ================== An encoding defines a mapping between bytes and text. A sequence of bytes allows for different textual interpretations. By specifying a particular encoding (such as UTF-8), we specify how the sequence of bytes is to be interpreted. For example, in HTML we normally declare a character encoding of UTF-8, using the following line: ```html <meta charset="utf-8" /> ``` This ensures that you can use characters from just about any human language in your HTML document, and they will display reliably. See also -------- * Character encoding on W3C * Character encoding on Wikipedia
Rendering engine - MDN Web Docs Glossary: Definitions of Web-related terms
Rendering engine ================ A **rendering engine** is software that draws text and images on the screen. The engine draws structured text from a document (often HTML), and formats it properly based on the given style declarations (often given in CSS). Examples of layout engines: Blink, Gecko, EdgeHTML, WebKit. See also -------- * Web browser engine on Wikipedia * Venkatraman.R - Behind Browsers (Part 1, Basics)
Interpolation - MDN Web Docs Glossary: Definitions of Web-related terms
Interpolation ============= Interpolation is a process of calculating values based on known values. The interpolation is used to obtain intermediate values of properties, such as height, width, etc., during the process of their animation. In gradients, interpolation is used to define intermediate values of colors based on a provided list of colors. Also, the term "interpolation" is used as a description of the substitution of strings in the template literals. See also -------- * Interpolation on Wikipedia * String interpolation on Wikipedia
BiDi - MDN Web Docs Glossary: Definitions of Web-related terms
BiDi ==== **BiDi** (BiDirectional) refers to a document containing both right-to-left and left-to-right text. Even when both directionalities occur in the same paragraph, the text in each language must appear in its proper directionality. See also -------- * Bi-directional text on Wikipedia
XLink - MDN Web Docs Glossary: Definitions of Web-related terms
XLink ===== XLink is a W3C standard which is used to describe links between XML and XML or other documents. Some its behaviors are left to the implementation to determine how to handle. Simple XLinks are "supported" in Firefox (at least in SVG and MathML), though they do not work as links if one loads a plain XML document with XLinks and attempts to click on the relevant points in the XML tree. For those who may have found XLink 1.0 cumbersome for regular links, XLink 1.1 drops the need to specify `xlink:type="simple"` for simple links. XLink is used in SVG, MathML, and other important standards. ### Specifications * XLink 1.0 * XLink 1.1 (currently a Working Draft) ### See also * XML * Code snippets:getAttributeNS - a wrapper for dealing with some browsers not supporting this DOM method
ECMAScript - MDN Web Docs Glossary: Definitions of Web-related terms
ECMAScript ========== **ECMAScript** is a scripting language specification on which JavaScript is based. Ecma International is in charge of standardizing ECMAScript. See also -------- * ECMAScript on Wikipedia * ECMAScript
CSS Object Model (CSSOM) - MDN Web Docs Glossary: Definitions of Web-related terms
CSS Object Model (CSSOM) ======================== The **CSS Object Model (CSSOM)** is a set of APIs for reading and modifying a document's style-related (CSS) information. In other words, similar to the way in which the DOM enables a document's structure and content to be read and modified from JavaScript, the CSSOM allows the document's styling to be read and modified from JavaScript. See also -------- * Populating the page: how browsers work
Code point - MDN Web Docs Glossary: Definitions of Web-related terms
Code point ========== A **code point** is a number assigned to represent an abstract character in a system for representing text (such as Unicode). In Unicode, a code point is expressed in the form "U+1234" where "1234" is the assigned number. For example, the character "A" is assigned a code point of U+0041. Character encoding forms, such as UTF-8 and UTF-16, determine how a Unicode code point should be encoded as a sequence of bytes. Different encoding forms may encode the same code point as different byte sequences: for example, the Cyrillic character "Ф", whose code point is U+0424, is encoded as `0xd0a4` in UTF-8 and as `0x0424` in UTF-16. See also -------- * The Unicode Standard: Code Points and Characters
Normative - MDN Web Docs Glossary: Definitions of Web-related terms
Normative ========= Normative is a word commonly used in software specifications to denote sections that are standardized and must be followed as a rule. Specifications might also contain sections that are marked as *non-normative* or *informative*, which means those are provided there for the purpose of helping the reader understand the specifications better or to showcase an example or best practice, which need not be followed as a rule. See also -------- * Description of normative and informative content in WHATWG wiki
Layout viewport - MDN Web Docs Glossary: Definitions of Web-related terms
Layout viewport =============== The **layout viewport** is the viewport into which the browser draws a web page. Essentially, it represents what is available to be seen, while the visual viewport represents what is currently visible on the user's display device. This becomes important, for example, on mobile devices, where a pinching gesture can usually be used to zoom in and out on a site's contents. The rendered document doesn't change in any way, so the layout viewport remains the same as the user adjusts the zoom level. Instead, the visual viewport is updated to indicate the area of the page that they can see. See also -------- * Visual Viewport API * Viewport on Wikipedia * A tale of two viewports (Quirksmode) * Viewport in the MDN Glossary * Visual viewport in the MDN Glossary
First Meaningful Paint - MDN Web Docs Glossary: Definitions of Web-related terms
First Meaningful Paint ====================== **First Meaningful Paint** (FMP) is the paint after which the biggest above-the-fold layout change has happened and web fonts have loaded. It is when the answer to "Is it useful?" becomes "yes", upon first meaningful paint completion. FMP is very sensitive to small differences in the page load. This can lead to inconsistent (bimodal) results. The metric's definition relies on browser-specific implementation details, which means it can't be standardized and has not been implemented in all web browsers. **Warning:** First Meaningful Paint (FMP) is deprecated in Lighthouse 6.0. Moving forward, consider using the LargestContentfulPaint API instead. See also -------- * First contentful paint * Largest Contentful Paint
Synchronous - MDN Web Docs Glossary: Definitions of Web-related terms
Synchronous =========== **Synchronous** refers to real-time communication where each party receives (and if necessary, processes and replies to) messages instantly (or as near to instantly as possible). A human example is the telephone — during a telephone call you tend to respond to another person immediately. Many programming commands are also synchronous — for example when you type in a calculation, the environment will return the result to you instantly, unless you program it not to. See also -------- * Asynchronous * Asynchronous JavaScript
Composite operation - MDN Web Docs Glossary: Definitions of Web-related terms
Composite operation =================== In CSS, the value of a property in a CSS rule is the *underlying value* of that property, and the value of that same property in a keyframe is its *effect value*. The *composite operation* is the specific operation that is used to combine an effect value with an underlying value to produce the final keyframe effect value. There are three types of composite operations: * **replace**: The effect value replaces the underlying value. The final effect value in this case is the original effect value itself. * **add**: The effect value is added to the underlying value. * **accumulate**: The effect value is combined with the underlying value. **Note:** Composite operation in CSS only applies to animations. See also -------- * `animation-composition` * `KeyframeEffect.composite`
Server Timing - MDN Web Docs Glossary: Definitions of Web-related terms
Server Timing ============= The Server Timing specification enables the server to communicate performance metrics from the request-response cycle to the user agent, and utilizes a JavaScript interface to allow applications to collect, process, and act on these metrics to optimize application delivery. See also -------- * https://www.w3.org/TR/server-timing/ * Resource Timing
SDP - MDN Web Docs Glossary: Definitions of Web-related terms
SDP === **SDP** (Session Description Protocol) is the standard describing a peer-to-peer connection. SDP contains the codec, source address, and timing information of audio and video. Here is a typical SDP message: ``` v=0 o=alice 2890844526 2890844526 IN IP4 host.anywhere.com s= c=IN IP4 host.anywhere.com t=0 0 m=audio 49170 RTP/AVP 0 a=rtpmap:0 PCMU/8000 m=video 51372 RTP/AVP 31 a=rtpmap:31 H261/90000 m=video 53000 RTP/AVP 32 a=rtpmap:32 MPV/90000 ``` SDP is never used alone, but by protocols like RTP and RTSP. SDP is also a component of WebRTC, which uses SDP as a way of describing a session. See also -------- * WebRTC protocols * Session Description Protocol on Wikipedia
High-level programming language - MDN Web Docs Glossary: Definitions of Web-related terms
High-level programming language =============================== A high-level programming language has a **significant abstraction** from the details of computer operation. It is designed to be easily understood by humans and for this reason they must be translated by another software. Unlike low-level programming languages, it may use natural language elements, or may automate (or even entirely hide) significant areas of computing systems, making the process of developing simpler and more understandable relative to a lower-level language. The amount of abstraction provided defines how "high-level" a programming language is. The idea of a language automatically translatable into machine code, but nearer to human logic, was introduced in computer science in the 1950s, especially thanks to the work of **John Backus** (IBM), to whom it owes the first high-level language to have been widely circulated: Fortran. For this innovation Backus received the Turing prize.
NaN - MDN Web Docs Glossary: Definitions of Web-related terms
NaN === NaN (Not a Number) is a numeric data type that means an undefined value or value that cannot be represented, especially results of floating-point calculations. For example, NaNs can represent infinity, result of division by zero, missing value, or the square root of a negative (which is imaginary, whereas a floating-point number is real). Practically speaking, if I divide two variables in a JavaScript program, the result may be NaN, which is predefined in JavaScript as "undefined". Hence this division may break the program. Now, if this computation was a small part of a much larger algorithm, it would be really painful to figure out where the error actually occurs. Fortunately, since the result will be NaN and I know my divisor may turn out to be 0, I can set up testing conditions that prevent any such computations in the first place or notify me of where they happen. See also -------- * NaN on Wikipedia * NaN in JavaScript
Enumerated - MDN Web Docs Glossary: Definitions of Web-related terms
Enumerated ========== In computer science, an **enumerated** type is a data type consisting of a limited set of named values. HTML enumerated attributes -------------------------- In HTML, enumerated attributes are attributes with a limited, predefined set of text values. For example, the global HTML `dir` attribute has three valid values: `ltr`, `rtl`, and `auto`. Each enumerated attribute has a default value for when the attribute is present without a value (the value is missing), and a default value for when the attribute is assigned an invalid value. Unlike Boolean HTML attributes — which are always true when the attribute is present whether the value is present, omitted, or invalid — with enumerated HTML attributes, the default for an omitted value may be different from the default for invalid values. For example, the global HTML `contenteditable` attribute has two valid keywords: `true` and `false`. If the attribute is present but no value is set, the value is `true`. If a value is set, but is invalid, such as `contenteditable="contenteditable"`, the value maps to a third state, `inherit`. ARIA enumerated attributes -------------------------- ARIA states and properties, being HTML, also have enumerated attributes. If an ARIA attribute includes a both a `true` and `false` value in the enumerated list, it generally treats an omitted attribute as `false` and an invalid value as `true`, while the default value for the empty string or omitted value depends on the attribute. For example, the `aria-current` attribute accepts a limited list of values that includes `page`, `step`, `location`, `date`, `time`, `true`, and `false`. In this case, if the attribute is not present, is an empty string, is present with no value, or is set to `aria-current="false"` the attribute is false and is not exposed to the user. Any non-empty string value not in the list of enumerated values is treated as if `aria-current="true"` were set. JavaScript enumerable properties -------------------------------- In JavaScript, enumerable properties are those properties whose internal enumerable flag is set to true, which is the default for properties created via simple assignment or via a property initializer. Most iteration mechanisms (such as `for...in` loops and `Object.keys`) only visit enumerable keys. See also -------- * Boolean * JavaScript data types and data structures * enumerated attributes in the HTML Standard
Jank - MDN Web Docs Glossary: Definitions of Web-related terms
Jank ==== **Jank** refers to sluggishness in a user interface, usually caused by executing long tasks on the main thread, blocking rendering, or expending too much processor power on background processes.
Database - MDN Web Docs Glossary: Definitions of Web-related terms
Database ======== A **database** is a storing system that collects organized data, to make some works easier like searching, structure, and extend. In web development, most databases use the relational database management system (RDBMS) to organize data and programming in SQL. Some databases, however, don't follow the former mechanism to organized data, which called NoSQL. Some famous server-side RDBMS are *MySQL*(or *MariaDB* which is a fork of it), *SQL Server*, and *Oracle Database*. On the other hand, some famous NoSQL examples are *MongoDB*, *Cassandra*, and *Redis*. Browsers also have their own database system called IndexedDB. See also -------- * Database on Wikipedia * Glossary + IndexedDB + SQL
First CPU idle - MDN Web Docs Glossary: Definitions of Web-related terms
First CPU idle ============== **First CPU Idle** measures when a page is minimally interactive, or when the window is quiet enough to handle user input. It is a non-standard Google web performance metric. Generally, it occurs when most, but not necessarily all visible UI elements are interactive, and the user interface responds, on average, to most user input within 50ms. See also -------- * Metrics which replaced First CPU Idle: + Time to interactive + Total blocking time
SCTP - MDN Web Docs Glossary: Definitions of Web-related terms
SCTP ==== **SCTP** (Stream Control Transmission Protocol) is an IETF standard for a transport protocol which enables the reliable, in-order transmission of messages while offering congestion control, multi-homing, and other features to improve reliability and stability of the connection. It's used for sending traditional telephone calls over the Internet, but is also used for WebRTC data. See also -------- * RFC 4960: Stream Control Transmission Protocol * Stream Control Transmission Protocol on Wikipedia
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
Page prediction =============== **Page Prediction** is a browser feature or script which, when enabled, tells the browser to download resources the user is likely to visit before the user requests the content. Page prediction improves performance by enabling almost instant loading of predicted content. However, page prediction may also download content a user does not seek. Some web applications include a prediction feature completing search text and address bar URLs based on browsing history and related searches. For example, as the user types in the address bar, the browser might send the current text in the address bar to the search engine before the user submits the request. Although browser page prediction and prediction services enable faster page loads, they consume additional bandwidth. Also, pre-loaded websites and embedded content can set and read their cookies as if they were visited even if they weren't. See also -------- * prerender * prefetch
SMPTE (Society of Motion Picture and Television Engineers) - MDN Web Docs Glossary: Definitions of Web-related terms
SMPTE (Society of Motion Picture and Television Engineers) ========================================================== The **Society of Motion Picture and Television Engineers** (**SMPTE**) is the professional association of engineers and scientists that develop and define standards and technologies used to create, broadcast, store, and present entertainment media. For example, SMPTE defines the standards used for digital cinema used by modern digital movie theaters.
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
CDN === A **CDN** (Content Delivery Network) is a group of servers spread out over many locations. These servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users. CDNs make for fast service less affected by high traffic. CDNs are used widely for delivering stylesheets and JavaScript files (static assets) of libraries like Bootstrap, jQuery etc. Using CDN for those library files is preferable for a number of reasons: * Serving libraries' static assets over CDN lowers the request burden on an organization's own servers. * Most CDNs have servers all over the globe, so CDN servers may be geographically nearer to your users than your own servers. Geographical distance affects latency proportionally. * CDNs are already configured with proper cache settings. Using a CDN saves further configuration for static assets on your own servers.
CORS-safelisted response header - MDN Web Docs Glossary: Definitions of Web-related terms
CORS-safelisted response header =============================== A *CORS-safelisted response header* is an HTTP header in a CORS response that it is considered *safe* to expose to client scripts. Only safelisted response headers are made available to web pages. By default, the safelist includes the following response headers: * `Cache-Control` * `Content-Language` * `Content-Length` * `Content-Type` * `Expires` * `Last-Modified` * `Pragma` Additional headers can be added to the safelist using `Access-Control-Expose-Headers`. **Note:** `Content-Length` was not part of the original set of safelisted response headers [ref] Examples -------- ### Extending the safelist You can extend the list of CORS-safelisted response headers by using the `Access-Control-Expose-Headers` header: ```http Access-Control-Expose-Headers: X-Custom-Header, Content-Encoding ``` See also -------- * HTTP * HTTP headers * `Access-Control-Expose-Headers` * Glossary + CORS + CORS-safelisted request header + Forbidden header name + Request header
DTLS (Datagram Transport Layer Security) - MDN Web Docs Glossary: Definitions of Web-related terms
DTLS (Datagram Transport Layer Security) ======================================== **Datagram Transport Layer Security** (**DTLS**) is a protocol used to secure datagram-based communications. It's based on the stream-focused Transport Layer Security (TLS), providing a similar level of security. As a datagram protocol, DTLS doesn't guarantee the order of message delivery, or even that messages will be delivered at all. However, DTLS gains the benefits of datagram protocols, too; in particular, the lower overhead and reduced latency. These features are especially useful for one of the most common areas in which DTLS comes into play: WebRTC. All of the WebRTC related protocols are required to encrypt their communications using DTLS; this includes SCTP, SRTP, and STUN. See also -------- * Datagram Transport Layer Security on Wikipedia * Specifications: + RFC 9147: The Datagram Transport Layer Security (DTLS) Protocol Version 1.3 + RFC 6347: Datagram Transport Layer Security Version 1.2 * Related specification + RFC 5763: Framework for Establishing a Secure Real-time Transport Protocol (SRTP) Security Context Using DTLS + RFC 5764: DTLS Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP) + RFC 6083: DTLS for Stream Control Transmission Protocol (SCTP) + RFC 8261: Datagram Transport Layer Security (DTLS) Encapsulation of SCTP Packets + RFC 7350: Datagram Transport Layer Security (DTLS) as Transport for Session Traversal Utilities for NAT (STUN) + RFC 7925: TLS / DTLS Profiles for the Internet of Things
Value - MDN Web Docs Glossary: Definitions of Web-related terms
Value ===== In the context of data or an object **wrapper** around that data, the value is the **primitive value** that the object wrapper contains. In the context of a **variable** or **property**, the value can be either a primitive or an **object reference**. In the context of CSS property values, there are specified, computed, and actual values. The final value for every CSS property applied to every element and pseudo-element is the result of a four-step calculation: the value is determined through specification (the "specified value", then resolved into a value that is used for inheritance (the "computed value"), then converted into an absolute value if necessary (the "used value"), and finally transformed according to the limitations of the local environment (the "actual value"). For CSS data types, see CSS values and units. See also -------- * Primitive wrapper class on Wikipedia
Shadow tree - MDN Web Docs Glossary: Definitions of Web-related terms
Shadow tree =========== A **shadow tree** is a hidden set of DOM nodes whose topmost node is a **shadow root**. The shadow root is the topmost node of a **shadow DOM** and not part of the regular document's DOM tree. The shadow root is attached to another node tree through a specific DOM node referred to as its **host**. This host may be part of another shadow tree or part of the regular DOM tree. The node tree of a shadow root's host is sometimes referred to as the **light tree**. The hidden DOM nodes of a shadow tree are generally not affected by anything applied outside the shadow tree, and vice versa. The **shadow boundary**, where the shadow DOM ends and the regular DOM begins, can be traversed, but only very intentionally: * Scripting shadow tree nodes from outside requires the use of a special Shadow DOM API to be accessed. * Styling a shadow tree from outside can be achieved via CSS scoping and CSS shadow parts. See also -------- * Using shadow DOM * `Element.shadowRoot` and `Element.attachShadow()` * `ShadowRoot` * `<slot>` * Accessibility tree
Accessibility tree - MDN Web Docs Glossary: Definitions of Web-related terms
Accessibility tree ================== The **accessibility tree** contains accessibility-related information for most HTML elements. Browsers convert markup into an internal representation called the *DOM tree*. The DOM tree contains objects representing all the markup's elements, attributes, and text nodes. Browsers then create an accessibility tree based on the DOM tree, which is used by platform-specific Accessibility APIs to provide a representation that can be understood by assistive technologies, such as screen readers. There are four properties in an accessibility tree object: **name** How can we refer to this thing? For instance, a link with the text "Read more" will have "Read more" as its name (find more on how names are computed in the Accessible Name and Description Computation spec). **description** How do we describe this thing, if we want to provide more description beyond the name? The description of a table could explain what kind of information the table contains. **role** What kind of thing is it? For example, is it a button, a nav bar, or a list of items? **state** Does it have a state? Examples include checked or unchecked checkbox states and collapsed or expanded states for the `<summary>` element. Additionally, the accessibility tree often contains information on what can be done with an element: a link can be *followed*, a text input can be *typed into*, etc. While still in draft form within the Web Incubator Community Group as of April 2022, the **Accessibility Object Model (AOM)** intends to incubate APIs that make it easier to express accessibility semantics and potentially allow read access to the computed accessibility tree. See also -------- * Glossary + Accessibility + ARIA
Information architecture - MDN Web Docs Glossary: Definitions of Web-related terms
Information architecture ======================== Information architecture, as applied to web design and development, is the practice of organizing the information / content / functionality of a website so that it presents the best user experience it can, with information and services being easily usable and findable. See also -------- * Information architecture on Wikipedia
Type coercion - MDN Web Docs Glossary: Definitions of Web-related terms
Type coercion ============= Type coercion is the automatic or implicit conversion of values from one data type to another (such as strings to numbers). *Type conversion* is similar to *type coercion* because they both convert values from one data type to another with one key difference — *type coercion* is implicit whereas *type conversion* can be either implicit *or* explicit. Examples -------- ```js const value1 = "5"; const value2 = 9; let sum = value1 + value2; console.log(sum); ``` In the above example, JavaScript has *coerced* the `9` from a number into a string and then concatenated the two values together, resulting in a string of `59`. JavaScript had a choice between a string or a number and decided to use a string. The compiler could have coerced the `5` into a number and returned a sum of `14`, but it did not. To return this result, you'd have to explicitly convert the `5` to a number using the `Number()` method: ```js sum = Number(value1) + value2; ``` See also -------- * Type conversion (Wikipedia) * Glossary + Type + Type conversion
Brotli - MDN Web Docs Glossary: Definitions of Web-related terms
Brotli ====== **Brotli** is a general-purpose lossless compression algorithm. It compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding, and second-order context modeling, providing a compression ratio comparable to the best currently available general-purpose compression methods. Brotli provides better compression ratios than gzip and deflate speeds are comparable, but brotli compressing is a slower process than Gzip compression, so gzip may be a better option for the compression of non-cacheable content. Brotli is compatible with most modern browsers, but you may want to consider a fallback. See also -------- * brotli.org * Brotli GitHub repository * Brotli on Wikipedia * Brotli on Caniuse
DSL - MDN Web Docs Glossary: Definitions of Web-related terms
DSL === The term **DSL** can have several meanings depending on the context. It may refer to: DSL (Digital Subscriber Line) **DSL (Digital Subscriber Line)** is a type of broadband internet connection that sends wired data transmissions over telephone lines. DSL (Domain-Specific Language) A **Domain-Specific Language (DSL)** is a type of computer language of limited scope, designed to address a particular problem within an application domain. See also -------- * DSL on Wikipedia
Immutable - MDN Web Docs Glossary: Definitions of Web-related terms
Immutable ========= An immutable value is one whose content cannot be changed without creating an entirely new value. In JavaScript, primitive values are immutable — once a primitive value is created, it cannot be changed, although the variable that holds it may be reassigned another value. By contrast, objects and arrays are mutable by default — their properties and elements can be changed without reassigning a new value. It can be beneficial to use immutable objects for several reasons: * To improve performance (no planning for the object's future changes) * To reduce memory use (make object references instead of cloning the whole object) * Thread-safety (multiple threads can reference the same object without interfering with one other) * Lower developer mental burden (the object's state won't change and its behavior is always consistent) Note that you can easily prove mutability: an object is mutable as long as it offers one way to change its properties. On the other hand, *immutability* is hard to prove if there are no language semantics to secure it — it is a matter of developer contract. For example, `Object.freeze()` is a language-level method to make an object immutable in JavaScript. See also -------- * Immutable on Wikipedia * Mutable
IMAP - MDN Web Docs Glossary: Definitions of Web-related terms
IMAP ==== IMAP (Internet Message Access Protocol) is a protocol used to retrieve and store emails. More recent than POP, IMAP allows folders and rules on the server. Unlike POP3, IMAP allows multiple simultaneous connections to one mailbox. Clients accessing a mailbox can receive information about state changes made from other clients. IMAP also provides a mode for clients to stay connected and receive information on demand. Mark Crispin initially developed IMAP in 1986 as *Interim Mail Access Protocol*. IMAP4 revision 1 is the current version, defined by RFC 3501. See also -------- * RFC 3501 * POP * IMAP on Wikipedia
DTMF (Dual-Tone Multi-Frequency signaling) - MDN Web Docs Glossary: Definitions of Web-related terms
DTMF (Dual-Tone Multi-Frequency signaling) ========================================== **Dual-Tone Multi-Frequency** (**DTMF**) signaling is a system by which audible tones are used to represent buttons being pressed on a keypad. Frequently referred to in the United States as "touch tone" (after the Touch-Tone trademark used when the transition from pulse dialing to DTMF began), DTMF makes it possible to signal the digits 0-9 as well as the letters "A" through "D" and the symbols "#" and "\*". Few telephone keypads include the letters, which are typically used for control signaling by the telephone network. Computers may make use of DTMF when dialing a modem, or when sending commands to a menu system for teleconferencing or other purposes. See also -------- * Dual-tone multi-frequency signaling on Wikipedia * Pulse dialing on Wikipedia
HPKP - MDN Web Docs Glossary: Definitions of Web-related terms
HPKP ==== **HTTP Public Key Pinning** (**HPKP**) is an obsolete security feature that tells a web client to associate a specific cryptographic public key with a certain web server to decrease the risk of MITM attacks with forged certificates. See also -------- * RFC 7469 * Wikipedia: HTTP Public Key Pinning
TURN - MDN Web Docs Glossary: Definitions of Web-related terms
TURN ==== **TURN** (Traversal Using Relays around NAT) is a protocol enabling a computer to receive and send data from behind a Network Address Translator (NAT) or firewall. TURN is used by WebRTC to allow any two devices on the Internet to enter a peer-to-peer connection. See also -------- * TURN on Wikipedia * WebRTC protocols * Specification * Specification update for IPv6
Simple response header - MDN Web Docs Glossary: Definitions of Web-related terms
Simple response header ====================== Old term for CORS-safelisted response header.
Engine - MDN Web Docs Glossary: Definitions of Web-related terms
Engine ====== The JavaScript engine is an interpreter that parses and executes a JavaScript program. See also -------- * JavaScript engine on Wikipedia
Lossy compression - MDN Web Docs Glossary: Definitions of Web-related terms
Lossy compression ================= **Lossy compression**, or irreversible compression, is a data-compression method that uses inexact approximations and partial-data discarding to represent content. In simpler terms: lossy compression causes data from the initial file to be lost, possibly causing degradation in quality. The process of such compression is irreversible; once lossy compression of the content has been performed, the content cannot be restored to its original state. Therefore, content that has undergone lossy compression should generally not be further edited. Lossy compression is widely used in image formats. ![Lossy compression image](/en-US/docs/Glossary/Lossy_compression/2019-11-18.png) Although there is no obvious difference quality between the two images above, the size of the second image has been significantly reduced, using lossy compression. See also -------- * Lossless compression
Vendor Prefix - MDN Web Docs Glossary: Definitions of Web-related terms
Vendor Prefix ============= Browser vendors used to add prefixes to experimental or nonstandard CSS properties and JavaScript APIs, so developers could experiment with new ideas. This, in theory, helped to prevent their experiments from being relied upon and then breaking web developers' code during the standardization process. Web developers included prefixed features on production websites, despite their experimental nature. This made it more difficult for browser vendors to ensure compatibility while working on new features. Including prefixed features also harmed smaller browser vendors who ended up having to add other browsers' prefixes in order to render popular websites. Now, experimental features in browsers are "put behind a flag". This allows developers to change browser configurations to test upcoming features. Browsers now add experimental features behind user-controlled flags or preferences. Flags can be added for smaller specifications enabling reaching a stable state much more quickly. CSS prefixes ------------ The most common browser CSS prefixes you will see in older code bases include: * `-webkit-` (Chrome, Safari, newer versions of Opera and Edge, almost all iOS browsers including Firefox for iOS; basically, any WebKit or Chromium-based browser) * `-moz-` (Firefox) * `-o-` (old pre-WebKit versions of Opera) * `-ms-` (Internet Explorer and Microsoft Edge, before Chromium) Sample usage: ```css -webkit-transition: all 4s ease; -moz-transition: all 4s ease; -ms-transition: all 4s ease; -o-transition: all 4s ease; transition: all 4s ease; ``` If you encounter the above code in a code base, you can safely remove all but the last line. All browsers support transitions without vendor prefixes: ```css transition: all 4s ease; ``` API prefixes ------------ Historically, browser vendors have also used prefixes for experimental APIs. If an entire interface was experimental, then the interface's name was prefixed (but not the properties or methods within). If an experimental property or method was added to a standardized interface, then the individual method or property was prefixed. ### Interface prefixes Prefixes for interface names are upper-cased: * `WebKit` (Chrome, Safari, newer versions of Opera and Edge, almost all iOS browsers (including Firefox for iOS); basically, any WebKit and Chromium-based browser) * `Moz` (Firefox) * `O` (Older, pre-WebKit, versions of Opera) * `MS` (Internet Explorer and Microsoft Edge, before Chromium) ### Property and method prefixes The prefixes for properties and methods are lower-case: * `webkit` (Chrome, Safari, newer versions of Opera and Edge, almost all iOS browsers (including Firefox for iOS); basically, any WebKit and Chromium-based browser) * `moz` (Firefox) * `o` (Old, pre-WebKit, versions of Opera) * `ms` (Internet Explorer and Microsoft Edge, before Chromium) Sample usage: ```js window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame; ``` If you encounter the above code in a code base, you can safely remove all but the first line. All browsers support `requestAnimationFrame` without vendor prefixes, and without `window`: ```js requestAnimationFrame(callback); ``` See also -------- * `-moz-` vendor-prefixed CSS extensions * `-webkit-` vendor-prefixed CSS extensions * Browser prefixes on Wikipedia
ARPA - MDN Web Docs Glossary: Definitions of Web-related terms
ARPA ==== **.arpa** (address and routing parameter area) is a top-level domain in the Domain Name System (DNS) used for Internet infrastructure purposes, especially reverse DNS lookup (i.e., find the domain name for a given IP address). The name comes from **ARPA**, currently known as DARPA, the Defense Advanced Research Projects Agency. DARPA is credited with developing precursors to the Internet (ARPANET), GPS, artificial intelligence, and virtual reality. TLD was designed at DARPA during a time when it was called ARPA, hence the `.arpa` domain name. The most prominent `.arpa` domains include `addr.arpa` and `ip6.arpa`, which provide namespaces for reverse DNS lookup of IPv4 and IPv6 addresses respectively. See also -------- * ARPANET * Official website * .arpa on Wikipedia
WebKit - MDN Web Docs Glossary: Definitions of Web-related terms
WebKit ====== *WebKit* is a framework that displays properly-formatted webpages based on their markup. Apple Safari depends on WebKit, and so do many mobile browsers (since WebKit is highly portable and customizable). WebKit began life as a fork of KDE's KHTML and KJS libraries, but many individuals and companies have since contributed (including KDE, Apple, Google, and Nokia). WebKit is an Apple trademark, and the framework is distributed under a BSD-form license. However, two important components fall under the LGPL: the **WebCore** rendering library and the **JavaScriptCore** engine. See also -------- * WebKit on Wikipedia * WebKit CSS extensions
LGPL - MDN Web Docs Glossary: Definitions of Web-related terms
LGPL ==== LGPL (GNU Lesser General Public License) is a free software license published by the Free Software Foundation. The LGPL provides a more permissive alternative for the strictly copyleft GPL. While any derivative work using a GPL-licensed program must be released under the same terms (free to use, share, study, and modify), the LGPL only requires the LGPL-licensed component of the derivative program to continue using the LGPL, not the whole program. LGPL is usually used to license shared components such as libraries (`.dll`, `.so`, `.jar`, etc.). See also -------- * GNU LGPL on Wikipedia * LGPL License text on gnu.org
RSS - MDN Web Docs Glossary: Definitions of Web-related terms
RSS === **RSS** (Really Simple Syndication) refers to several XML document formats designed for publishing site updates. When you subscribe to a website's RSS feed, the website sends information and updates to your RSS reader in an RSS document called a *feed*, so you don't need to check all your favorite websites manually. See also -------- * RSS on Wikipedia * Latest specification
Main thread - MDN Web Docs Glossary: Definitions of Web-related terms
Main thread =========== The **main thread** is where a browser processes user events and paints. By default, the browser uses a single thread to run all the JavaScript in your page, as well as to perform layout, reflows, and garbage collection. This means that long-running JavaScript functions can block the thread, leading to an unresponsive page and a bad user experience. Unless intentionally using a web worker, such as a service worker, JavaScript runs on the main thread, so it's easy for a script to cause delays in event processing or painting. The less work required of the main thread, the more that thread can respond to user events, paint, and generally be responsive to the user. See also -------- * Asynchronous JavaScript * Web worker API * Service worker API * Glossary + Thread

Dataset Card for MDN

Waifu to catch your attention.

Dataset Description

MDN is a ~57M Tokens (llama-2-7b-chat-tokenizer) / ~46.52M Tokens (RWKV Tokenizer) scrape of MDN (Developer.mozilla.org). It serves as a training resource for large language models and other NLP tasks. This card details the dataset's origin, content, and limitations.

  • Curated by: KaraKaraWitch
  • Funded by: Recursal.ai (I work there lol)
  • Shared by: KaraKaraWitch
  • Language(s) (NLP): English, Espanol, French, Japanese, Korean, Brazilian Portuguese, Russian, Chinese Simplified, Chinese Traditional
  • License: cc-by-sa-2.5

MDN was created under time constraints for the release of EagleX v1, and may contain biases in selection.

Supported Tasks and Leaderboards

Primarily used for language modeling.

Languages

MDN lists the following languages:

  • English
  • Espanol
  • French
  • Japanese
  • Korean
  • Brazilian Portuguese
  • Russian
  • Chinese Simplified
  • Chinese Traditional

Processing

We obtained a list of pages to download with the MDN's sitemap.xml. This was manually downloaded. For each sitemap, we scrape the website. saving the raw html responses for further filtering and cleaning.

For the actual html processing, we recommend reading the code found in the file: MDNClean.py.

The file itself is a typer application with the following commands:

- sitemap
  - Gets a list of urls to download and downloads it to a folder.
- clean
  - cleans a folder. saving each the cleaned text to a final jsonl.

We have noted an issue where there could be a false positive virus-detection on 4 of the compressed files. We have used the dataset in it's uncompressed form and didn't encounter any issues.

Data Instances

Refer to this sample to see all the relavant fields.

{
    "title": "Game development",
    "text": "\n\nGame development\n================\n\nGaming is one of the most popular computer activities. New technologies are constantly arriving to make\n it possible to develop better and more powerful games that can be run in any standards-compliant web\n browser.\n\nDevelop web games\n-----------------\n\nWelcome to the MDN game development center! In this area of the site, we provide resources for web<...TRUNCATED>"
}

The format has the following keys:

- "title" (str) [The title of the article]
- "text" (str) [The html content converted fro html into markdown.]

Recursal's Vision

To make AI accessible to everyone, regardless of language, or economical status

This is the collective goal of the RWKV Open Source foundation and Recursal AI, the commercial entity who backs it.

We believe that AI should not be controlled by a select few individual organization. And that it should be made accessible regardless if you are rich or poor, or a native speaker of english.

About RWKV

RWKV is an Open Source, non profit group, under the linux foundation. Focused on developing the RWKV AI architecture, in accordence to our vision.

The RWKV architecture scales efficiently and economically. As an RNN & Transformer hybrid, it is able to provide the performance similar to leading transformer models, while having the compute and energy efficiency of an RNN based architecture.

You can find out more about the project, and latest models, at the following

About Recursal AI

Recursal AI, is the commercial entity built to provide support for RWKV model development and users, while providing commercial services via its public cloud, or private-cloud / on-premise offerings.

As part of our vision. Our commitment, is to ensure open source development and access to the best foundational AI models and datasets.

The following dataset/models provided here, is part of that commitment.

You can find out more about recursal AI here

Dataset Curators

KaraKaraWitch. (I typically hang out in PygmalionAI discord, sometimes EleutherAI. If something is wrong, @karakarawitch on discord.)

I'd be happy if you could spread the word and recommend this dataset.

Licensing Information

MDN lists their license as CC-BY-SA.

Recursal Waifus (The banner image) are licensed under CC-BY-SA. They do not represent the related websites in any official capacity unless otherwise or announced by the website. You may use them as a banner image. However, you must always link back to the dataset.

Citation Information

@misc{MDN,
  title         = {MDN},
  author        = {KaraKaraWitch, recursal.ai},
  year          = {2024},
  howpublished  = {\url{https://huggingface.co/datasets/recursal/MDN}},
}
Downloads last month
305
Edit dataset card