link: Web
Web Data Handling and Formats
Data Formats
Data formats are crucial for structuring the data that is exchanged between web clients and servers. Here are two of the most widely used data formats:
- XML: A flexible text format that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. Widely used in complex data structures across various web technologies.
- JSON: Lightweight data-interchange format that is easy for humans to read and write, and easy for machines to parse and generate. Predominantly used in web applications as it is natively supported by JavaScript.
- Protobuf: Compared to JSON, which uses text, Protobuf’s binary format significantly reduces payload size, enhancing both transmission speed and efficiency.
MIME Types
MIME types play a crucial role in the web by specifying the nature and format of a file. They are used to determine how a file should be processed by a browser.
- MIME types are a standard way of classifying file types on the Internet. They are used in web communications to inform the browser about the type of the file being sent, helping the browser to display or handle the file appropriately.
Common Character Encodings:
- UTF-8: A character encoding capable of encoding all possible characters (called code points) in Unicode. It is the dominant character encoding for the internet.
- ASCII (American Standard Code for Information Interchange): An older character encoding standard that encodes 128 specified characters into seven-bit integers.