No commit activity in last 3 years
No release in over 3 years
Rails: Enabled cookies inside IFrames for IE via p3p headers
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0
>= 0
 Project Readme

Rails: Enabled cookies inside IFrames for IE via P3P headers.

Deprecated / Unmaintained

use something like this instead:

class AllowCookiesInIframesMiddleware
  def initialize(app)
    @app = app
  end

  def call(env)
    response, headers, body = @app.call(env)
    headers['P3P'] = %{CP="NOI DSP COR NID ADMa OPTa OUR NOR"}
    [response, headers, body]
  end
end

Old Readme

IFrames in IE only get the same cookies as normal pages when P3P headers are added
=> 'iframe-using' IE users get P3P headers on every request
304 Not modified pages do not get P3P headers (via ETag)
=> 'iframe-using' IE users do not get 304

Install

gem install ie_iframe_cookies

Usage

To cookie-tag users as 'iframe-using', add this to all actions rendered inside IFrames.
(only IE users are tagged)

before_action :normal_cookies_for_ie_in_iframes! # only: [:foo, :bar]

TIPS

  • Problems with Safari? try this or that

Authors

Sascha Depold

Michael Grosser
michael@grosser.it
License: MIT
Build Status