This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

XHTML site doesn't load CSS and JS from same subdomain.

  • 4 replies
  • 7 have this problem
  • 12 views
  • Last reply by pumi78

more options

If I make an XHTML website with linked external CSS and javascript code, the firefox doesn't load the external CSS and JS file. For example, if the URL is http://sub.domain.tld/... and the CSS and JS is used for this URL too, firefox not open them.

If I change another subdomain for the CSS and JS files like http://static.sub.domain.tld/ or http://static.domain.tld/ the Firefox open this file correctly, and handle them.

If I make an XHTML website with linked external CSS and javascript code, the firefox doesn't load the external CSS and JS file. For example, if the URL is http://sub.domain.tld/... and the CSS and JS is used for this URL too, firefox not open them. If I change another subdomain for the CSS and JS files like http://static.sub.domain.tld/ or http://static.domain.tld/ the Firefox open this file correctly, and handle them.

All Replies (4)

more options

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.

The helpers at that forum are more knowledgeable about web development issues.

You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

more options

I found something, but it is a little weird. The error caused by Ad Block Plus extension, but...

The subdomain name looks like: http://ad.somedomain.tld/. Maybe somewhere the http://ad.* is blocked by ABP.

The interesting thing is: For CSS and JS I used same server, same service (just add subdomain as a new virtual host). In this case the link is: http://css.ad.somedomain.tld/ for CSS, and for JS I'm using http://js.ad.somedomain.tld.

I'm not understanding why it works on http://css.ad.* and http://js.ad.* and why is not working if I use the http://ad.* because the main site (http://ad..../admin.html) is downloaded and the xhtml code appearing in the browser well.

Update: I found the filter. It's on the group "EasyList (USA)" The filter is: |http://ad.$~object_subrequest,domain=~europa.eu|~gogopin.com|~sjsu.edu|~uitm.edu.my|~uni-freiburg.de But it hasn't explained why not blocked the *.html and *.php too for the sites wich use domain http://ad.*/*.html

more options

if the js-files are on differents subdomains but on the same domain like: http://JSsubdomain.domain.com http://HTMLsubdomain.domain.com

just add in to your js-files: document.domain = "domain.com";

more options

Thank you for everybody. I have found the solution.

I disabled a filter in AdBlockPlus, which blocked the site starting with http://ad.*