Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7675283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:55:36+00:00 2026-05-31T16:55:36+00:00

I have a css file that I only want to be visible to Firefox

  • 0

I have a css file that I only want to be visible to Firefox browsers. I thought I was super-smart coming up with

@-moz-document url-prefix() {
    @import url("/a-large-css-file.css");
}

…only to find out that @import directives cannot be nested like that.

More details:

  • The file is heavy, so it’s not an option for me to include its
    content inline inside the “conditional” as I don’t want for it to
    affect total request size for other browsers
  • The file contains a font-face declaration with the font itself
    base64-encoded. Why you ask? Firefox does not allow for fonts to be
    downloaded from a different subdomain and that’s how twe host static
    content. There’s a nice recap of the issue here and here
  • If you’ve looked through the links in the point above, you’d see a
    suggestion to add an Access-Control-Allow-Origin http header –
    unforunately this is not an option for me given our infrastructure
    setup and deployment procedures.

Even more details:

  • Static content is hosted on a url similar to
    resources.environmentN.domain.com while the pages’ urls are similar to environmentN.domain.com where N is different across
    the environments.
  • We’re have Apache Tomcat running Liferay Portal.

At this stage I’m open to almost any workaround 🙂

Edit

I probably should have phrased this differently, but I must mention that I’m probably not open to javascript workarounds, the reason for that would be an unstyled content flash even after the resource is successfully cached locally – this would be the case with solutions proposed so far.

My apologies for the confusion!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:55:37+00:00Added an answer on May 31, 2026 at 4:55 pm

    You should really just bite the bullet and get the server side fixed, since http://dev.w3.org/csswg/css3-fonts/#same-origin-restriction requires the Firefox behavior and the other browsers will update to it at some point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a HTML/CSS File laid out with a bunch of areas that need
I have a header that has a css background image that I want to
I want to have an <input type='file'> that overlaps on an image, so that
I have a problem using a given CSS file I don't want to change.
So I have a page of HTML that has its own CSS file. It
I have a resume and a profile page that only has html and css.
I have a CSS file, which contain the style information of my web. Some
I have a css file of this type col1 col2 AAA a 1 a1
If I have two css files: File 1: .colorme { background-color:Red; } File 2:
What to look for when I have associated a CSS file with my Default.aspx

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.