Welcome Guest, Not a member yet? Register   Sign In
Redirect not working in Safari after a flash session is set

[eluser]Damien Tan[/eluser]
This is really killing me.
Apparently Safari do not process redirect after setting a flash session.

it works in Chrome though.. Anyone got a solution?

Tried the cookie domain name settings in config but it did not work!

Safari doesn't know what a flash session is. All it knows is that you set a cookie. Have you looked at the request headers? Have you tried other browsers besides Chrome and Safari? Is it Safari on Mac or Windows? What have you done to try to debug?

[eluser]Damien Tan[/eluser]
I have something like this:

$this->ci->session->set_flashdata('createdOrder', True);
redirect('pages/view/order#bet', 'refresh');

The user will be redirected back to the form page once they have successfully created an order.
A message will be generated in the form page if the createdOrder is True.

It is working in Chrome and thinking that Safari is also based on webkit, they should react the same way.
However, Safari just returned a blank page. Manually redirecting however works and retain the session.

I am running local, Safari on Mac and I have yet to test it on other browsers.
Any ideas what's wrong?

As far as I know, you can't set a cookie and redirect in the same request. I may be wrong, but once redirected, if you check the cookie data, you may not find that the expected value is there.

[eluser]Damien Tan[/eluser]
The cookie data is there but the redirect do not work in Safari.

Any idea how could I pass variables over to another page?
?var=value does not work because I have a #bet after the url.

[eluser]Damien Tan[/eluser]
Could there be any other solution to this?
Please help!

Theme © iAndrew 2016 - Forum software by © MyBB