Zumindest das Javascript wird mit einem falschen MIME-Typ (text/html) ausgeliefert, warum auch immer. Nachdem es auf einem Ionos-Webserver klappt, muss es wohl an XAMPP liegen.
Der nachfolgende Abschnitt aus der 3.5.x .htaccess ist unter 4.x nicht in der .htaccess enthalten:
Code:
##
# Set the proper MIME types
# @see https://github.com/h5bp/html5-boilerplate
##
<IfModule mod_mime.c>
AddType application/javascript js jsonp
AddType application/json json
AddType audio/ogg oga ogg
AddType audio/mp4 m4a f4a f4b
AddType video/ogg ogv
AddType video/mp4 mp4 m4v f4v f4p
AddType video/webm webm
AddType video/x-flv flv
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttf ttc
AddType font/opentype otf
AddType application/x-font-woff woff
AddType image/x-icon ico
AddType image/webp webp
AddType text/cache-manifest appcache manifest
AddType text/x-component htc
AddType application/xml rss atom xml rdf
AddType application/x-web-app-manifest+json webapp
AddType text/x-vcard vcf
AddType application/x-shockwave-flash swf
</IfModule>
Wenn also der Webserver (hier XAMPP) nicht von sich aus diese Dateitypen mit dem richtigen MIME-Typ ausliefert, dann wird die Ressource wegen des MIME-Typ Konflikts eben nicht geladen. Es wundert mich zwar, dass XAMPP das nicht macht (welche Version von XAMPP ist das eigentlich?), aber eine andere Erklärung fällt mir momentan nicht ein. Ich würde jetzt einfach mal den obigen Code in die .htaccess im web-Verzeichnis oben reinkopieren und es dann nochmal probieren. Kann man aber auch im XAMPP nötigenfalls so konfigurieren.
Edit: Sehe gerade, dass mittlerweile andere MIME (media) types empfohlen werden, siehe https://github.com/h5bp/html5-boiler...dist/.htaccess. Das sollte man eventuell dann im obigen Code anpassen.
Lesezeichen