mercredi 6 janvier 2016

Internet explorer doesn't see laravel 5.1 cookies

Framework: Laravel 5.1 Problem browsers: All versions of IE (inc. Edge)

Problem: When posting a form a cookie is set when the user is send back after submitting the form.

return Response::make($view)->withCookie(cookie('parameters', json_encode($request->except(['_token']))))

This works in ALL browsers, except of course Internet explorer (why does this browser still exists?!)

In internet explorer i get an empty array when i dump the cookie. I've tried a lot. Im **not using iframes,** but i did try to use P3P headers without success, i've set IE to the lowest security level possible, also without success. Im not using suddomains and i`m not using underscores. I tried it on mutiple domains, i tried it on apache, nginx, and in my local env. (homestead) it also does not work.

It looks like the cookie isn't set (while in all other browsers it is being set). Unfortunately IE does not have an option or possible add-on to easily check al stored cookies (like all other browsers do). But i`m almost certain the cookie doesn't get stored. This is strange, because laravel's session cookies are stored.

I think i already spent a half a day on this, but cant find any solutions. If i would get payed for all the hours i spend on weird bugs with IE, i would be a very rich man. Will stop bashing IE now, but men, what a horrible browser.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire