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

  • Home
  • SEARCH
  • 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 8223879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:52:03+00:00 2026-06-07T14:52:03+00:00

I am using the YUI compressor plugin to compress and gzip JS and CSS

  • 0

I am using the YUI compressor plugin to compress and gzip JS and CSS files within my Java EE application.

However, I am not clear on how to reference them within my HTML/JSP files.

If I simply use the .gzip reference, the browser obviously complains saying –

Resource interpreted as Script but transferred with MIME type application/x-gzip

The current reference looks like this (which throws the above error):

<script type="text/javascript" src="/scripts/home.js.gz"></script>
  • 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-06-07T14:52:06+00:00Added an answer on June 7, 2026 at 2:52 pm

    You reference them with the normal .js and .css extensions and check if gzip is working by checking the response headers on the CSS and JS files by inspecting via firebug or developer tools.

    Gzipping is typically done at the web server level.

    If you’re using tomcat you can open the conf/server.xml of your Tomcat installation and add the following to the Connector definition.

    <Connector port="8080" protocol="HTTP/1.1" redirectPort="8443" connectionTimeout="20000"
               compressableMimeType="text/html,text/xml,text/css,text/javascript,text/plain,application/javascript,application/json" 
               compression="2048"/>
    

    For Apache look up mod_gzip or mod_deflate

    This goes in your root .htaccess file but if you have access to httpd.conf that is better.

    <ifModule mod_deflate.c>
    <filesMatch "\.(js|css)$">
    SetOutputFilter DEFLATE
    </filesMatch>
    </ifModule>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Yahoo Yui Compressor to compress my css styles. I reference
I am using the YUI compressor MSBuild task to combine/minify css/js files. The files
How can i compress individual css files using YUI build task (or otherwise). Scenario:
I am using YUI Compressor to minify Javascript files. However these Javascript files contains
I'm using Yahoo's Minifier here: http://refresh-sf.com/yui/ I use it to compress CSS and Javascript.
Within the context of a web application written using the YUI library 3.4.1 it
I'm using the YUI compressor to merge and minify my JS-files. One problem I'm
I'm combining multiple js files using YUI Compressor. The command works successfully and outputs
I'm using the yui-compressor plugin for maven and can't seem to get it to
I wish to create a js/css minifying website using yahoo YUI compressor. How can

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.