.js JavaScript-Programm
Text & Quellcode
| MIME-Typ | text/javascript |
|---|---|
| Beschreibung | JavaScript-Programm |
| Kategorie | Text & Quellcode |
| Signatur (Magic Bytes) | 23 21 20 2F 62 69 6E 2F 67 6A 73 (#! /bin/gjs)23 21 20 2F 75 73 72 2F 62 69 6E 2F 67 6A 73 (#! /usr/bin/gjs)23 21 2F 62 69 6E 2F 67 6A 73 (#!/bin/gjs) |
| Basiert auf | application/x-executable, text/plain |
| Weitere Endungen | .jsm, .mjs |
Häufige Fragen
Was ist eine .js-Datei?
Eine .js-Datei ist ein Format vom Typ „JavaScript-Programm“ (MIME-Typ text/javascript).
Womit öffne ich eine .js-Datei?
Mit jedem Texteditor – etwa Notepad++, Visual Studio Code oder unter Linux gedit und vim. Die Datei enthält lesbaren Text, ggf. Quellcode oder Konfiguration.
Woran erkennt man eine echte .js-Datei?
Am Dateianfang, der sogenannten Signatur (Magic Bytes): 23 21 20 2F 62 69 6E 2F 67 6A 73 (#! /bin/gjs), 23 21 20 2F 75 73 72 2F 62 69 6E 2F 67 6A 73 (#! /usr/bin/gjs) und 23 21 2F 62 69 6E 2F 67 6A 73 (#!/bin/gjs). Unter Linux und macOS prüft file --mime-type example.js den tatsächlichen Typ unabhängig von der Endung.
Auf welchem Format basiert .js?
Technisch ist eine .js-Datei ein Untertyp von „Ausführbare Datei“ (application/x-executable). Programme für dieses Grundformat können die Datei daher oft ebenfalls lesen.
Welcher MIME-Typ gehört zu .js?
Der MIME-Typ ist text/javascript. Im Apache-Webserver: AddType text/javascript .js; in nginx: types { text/javascript js; }.