Skip to content

Instantly share code, notes, and snippets.

@ihower
Created January 12, 2013 12:40
Show Gist options
  • Save ihower/4517934 to your computer and use it in GitHub Desktop.
Save ihower/4517934 to your computer and use it in GitHub Desktop.
class WelcomeController < ApplicationController
# http://code.google.com/p/mod-spdy/wiki/OptimizingForSpdy#Using_SPDY_server_push
def server_push
response.headers["X-Associated-Content"] =
'"https://www.ihower.tw/assets/application.css":0,
"https://www.ihower.tw/assets/application.js":1,
"https://www.ihower.tw/assets/flags/Taiwan.png":2,
"https://www.ihower.tw/assets/flags/Afghanistan.png":3,
"https://www.ihower.tw/assets/flags/Kenya.png":4'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment