Closed
Bug 914163
Opened 11 years ago
Closed 11 years ago
Localhost HTML5 Javascript createElement("link")
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dev.dertin, Unassigned)
Details
Attachments
(1 file)
1.69 KB,
application/octet-stream
|
Details |
User Agent: Mozilla/5.0 (X11; Linux i686; rv:23.0) Gecko/20100101 Firefox/23.0 (Beta/Release) Build ID: 20130820224636 Steps to reproduce: The problem only occurs on a localhost server. 1- Create an html file 2- Insert the following code: <!DOCTYPE html> <html> <head> <script type="text/JavaScript" data-cfasync="false"> (function() { var nomarch = 'css/mycssfile'; var d = new Date(); var cssLink=document.createElement("link"); cssLink.rel = "stylesheet"; cssLink.type = "text/css"; cssLink.href = nomarch+".css?rnd="+d.getTime(); cssLink.crossOrigin = "Anonymous"; cssLink.media = "all"; document.getElementsByTagName("head")[0].appendChild(cssLink); })(); </script> </head> <body> </body> </html> 3 - Create a css file to test the code. .../css/mycssfile.css 4 - Insert some element within the body with some css class Actual results: Do not load the css, firebug shows the element created, but the css does not work. If we remove the doctype, the code works. The problem only occurs on a localhost server, html5 somehow behaves differently in localhost environment. Expected results: That the css code is loaded and that it works.
Reporter | ||
Comment 1•11 years ago
|
||
The problem was in the configuration of apache server. missing add this code to httpd.conf: <Directory "/home/dertin/www"> Options Indexes MultiViews +FollowSymlinks +SymLinksIfOwnerMatch AllowOverride All Order allow,deny Allow from all </Directory>
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•