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 8568885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:12:26+00:00 2026-06-11T18:12:26+00:00

I have just put into production one of my Ruby On Rails Application and

  • 0

I have just put into production one of my Ruby On Rails Application and noticed it was really slow in its loading time.

My Application runs on railsplayground.net using passenger on an apache server.

I took a look at a couple of sites including: pingdom , webpagetest
and the major downfall I had noticed in my application is that the caching isn’t working on my javascript and css files as can be seen here:
enter image description here
enter image description here
enter image description here

I have tried reading all sorts of guides on how to cache, but all of my efforts turned up with no results.

I put this in my header file:

  <meta http-equiv="cache-control" content="public" />
  <meta http-equiv="last-modified" content="Sun, 23 Sep 2012 08:00:00 GMT" />

and this is turned on in my production.rb:

config.action_controller.perform_caching = true
  • 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-11T18:12:27+00:00Added an answer on June 11, 2026 at 6:12 pm

    What these items are complaining about is that the when you are serving static assets (images, css, javascript) the webserver isn’t telling the browser that they are cacheable so they will be refetched more often than necessary.

    When using the asset pipeline (as you seem to be) the asset filename includes an md5 checksum of its content so you can set very long expiry times: if you change the file then the checksum will change to and so the file browsers requests will have a different name.

    You usually do this in apache’s configuration, by sticking something like this in the block for the virtual host

    <Location /assets>
          ExpiresActive on
          ExpiresDefault "access plus 1000 days"
    </Location>
    

    It’s also worth turning on gzipping of javascript & css files which can save a lot of time. You’d do this by adding something like this to the virtual host:

    <Location />
      AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-javascript text/css  application/javascript application/json text/javascript
    </Location>
    

    Older browsers may not support this, but this is so widely supported that I turn this on systematically (to give you an idea, even IE 4 and Netscape Navigator 4 support this)

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

Sidebar

Related Questions

hey this is so that I should just have put some infomation into the
I have some jQuery global variables that I want to just put into my
I have just put implemented Facebook connect on my web-site using the JavaScript SDK.
When i have a few content with work well. And if i just put
I have MANY small Test Projects where I put together just enough code to
I have a string, for example; llama,goat,cow and I just need to put a
I have two jobs on Hudson, A & B. I just want to put
I am using sshexec, which depends on jsch-0.1.48.jar. I can't just put that into
I have just brought a web fontface to use for the first time. I
I have just put together a Go package that is going to be a

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.