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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:39:13+00:00 2026-05-26T23:39:13+00:00

In our Rails app that runs in Facebook canvas, we have a workflow where

  • 0

In our Rails app that runs in Facebook canvas, we have a workflow where a logged in user can build a document and then download it.

When the file is ready we show a link to it. This is just a Rails action that renders using send_file in dev or head (with proper NGINX config) in production. This part works fine.

In order to have the file start downloading without opening a new browser tab, we had the link target an empty iframe.

This was working, but a while back, presumably due to a security change by Facebook, our link stopped working. The JavaScript errors show:

Refused to display document because display forbidden by X-Frame-Options.

Users can still open the link in a new tab and it will download the file and a quick fix is to make the link open a new browser tab, but that isn’t as good of a user experience.

We tried changing the X-Frame-Options in the headers and/or using meta tags, but this is canvas (running in an iframe), so that just stopped those views from displaying.

I also tried this form solution, but it didn’t do anything (I could have been doing it wrong).

Is there any way we can build a button or link that will start the file download without opening a new browser tab?

  • 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-05-26T23:39:14+00:00Added an answer on May 26, 2026 at 11:39 pm

    Do you need to set the target at all? With no target set would it not trigger a file download popup in the browser, but leave the current browser window/tab on the same content?

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

Sidebar

Related Questions

Some of the users of our Ruby on Rails app have complained that page
Our Rails app is using Restful Authentication for user/session management and it seems that
In our Rails 3.2.6 app, we have a model attribute named 'version' that is
Our rails app runs on a ubuntu 10.04 server with sqlite3 database. How can
In our rails 3.1.4 app, there are user (parent) and user_levels (child) models. class
A medium sized rails app that our company has been working on is getting
A user registers on our Rails app and they're given javascript to embed a
I'm about to start rewriting bits and pieces of our Rails app that do
We have a rails app that needs to ssh to a remote server (unix)
We're trying to set up our rails app to work with SSL. We have

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.