dream12001
2016-05-04 05:36
浏览 59
已采纳

Laravel Ajax调用删除会话闪存数据

My repeated Ajax call deletes session flash data

I have a Javascript to make an Ajax call it calls my api every 5 seconds to update my user page.

I am returning a view with flash data which it has to keep for the next request but the Ajax call clears it and the next request is not completed.

Is there a way to complete it?

I can think to re-flash on an api call, but that seems weird. Any other way?

图片转代码服务由CSDN问答提供 功能建议

我重复的Ajax调用删除会话闪存数据</ p>

我有一个Javascript到 做一个Ajax调用它每隔5秒调用我的api来更新我的用户页面。</ p>

我正在返回一个带有flash数据的视图,它必须为下一个请求保留,但是Ajax调用会清除 它和下一个请求没有完成。</ p>

有没有办法完成它?</ p>

我可以考虑在api通话时重新刷新 ,但这似乎很奇怪。 还有其他方式吗?</ p> </ div>

1条回答 默认 最新

相关推荐 更多相似问题