Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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

  • 4 个回答
  • 7 人有此问题
  • 12 次查看
  • 最后回复者为 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.

所有回复 (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.*