Hacker News new | ask | show | jobs
by LocalPCGuy 5277 days ago
Because the app is in an iFrame, you can just use regular linked files and then the back button works as expected.

If you do that though, there are a few other issues - you may have to account for pages that do/don't have the Facebook signed_request post data - i.e. you probably need to store it in a session or cookie (and deal with the relevant IE7 cookie + iFrame issues by settings P3P header if you support IE7. Can't remember offhand if it is a problem in IE8.)

Obviously more complex apps where navigation is handled through AJAX get tricky when you can't access the container frame. Maybe look into history.js (https://github.com/balupton/History.js/) and see if it works in a Facebook app?

1 comments

History.js looks promising. I'll definitely dig deeper. Using regular A tags does not work, however, hence my question.

I decided not to support IE7 since this is a brand new app. It will be IE8+. I had to deal with the P3P issue in the past and it was a pain. Hopefully IE8 isn't as picky.

Thanks for the help! I now have something to investigate.

If some other people have also problems with IE, facebook and session cookies, have a look at this reciep, i wrote. The solution is pretty easy. http://recipes.wearekiss.com/view/platform/problem-solutions...
I had trouble doing just this, mainly because of how IE handles cookies on 304. I used this Gem for a Rails app (~1 year ago): https://rubygems.org/gems/rack-p3p.