Skip to content

Instantly share code, notes, and snippets.

@bitfidget
Created May 6, 2014 05:42
Show Gist options
  • Save bitfidget/d579ba069e7585490d1c to your computer and use it in GitHub Desktop.
Save bitfidget/d579ba069e7585490d1c to your computer and use it in GitHub Desktop.

to pre compile your css and js for testing the live version locally

config/environments/production.rb - change to true

in console:

rake assets:precompile <- compiles all assets rails server -e production <- starts server in production state

to run on a different port

rails server -p 3001 <- or whatever port you want to use

browsers can help

yslow.org chrome - pagespeed extension

if you have to load multiple scripts and you're using cdn hosted scripts, using different servers can speed things up as it reduces script blocking (the browser has to wait for the server to respond before it starts it's next request).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment