0

Is it possible to do page redirects in canvas app? I was reading facebook's tutorial and I am seeing this:

Note that http://www.example.com/canvas cannot forward to another URL via HTTP redirect responses, for example response code 301, but has to return the response directly.

How is this possible?

Antony
  • 14,900
  • 10
  • 46
  • 74
aherlambang
  • 14,290
  • 50
  • 150
  • 253

2 Answers2

0

What the documentation says with this is that you should not have your first page that loads in the canvas, which is referenced here as http://www.example.com/canvas, send a 301 redirect to some another page. You should render and send first page, or http://www.example.com/canvas, and then, if your situation requires redirects then you may do the same.

AKA
  • 5,479
  • 4
  • 22
  • 36
Anvesh Saxena
  • 4,458
  • 2
  • 23
  • 30
0

While the initial canvas page cannot return a 301 response, you can have the loaded page do a redirect via javascript.

Fisch
  • 3,775
  • 1
  • 27
  • 38