Welcome Guest, Not a member yet? Register   Sign In
Flashdata and AJAX calls on every page load
#1

(This post was last modified: 01-16-2016, 07:50 PM by komirad.)

My app has an AJAX request on every page load. (Notifications)

This has made the flashdata feature pretty useless for the rest of the code. As you know flashdata is deleted on the next request, and the ajax call deletes my flashdata.

I have worked around this by looping through all the flashdata and calling keep_flashdata() so that the AJAX request doesn't delete any flashdata.

Is there a better way to handle this?

Maybe a way to say
PHP Code:
if($x){
   
// Set flash data to not delete.


Or should I create my own flashdata library so that I can have different sets of flashdata that can have different configurations? The problem with this is third party libraries will all have to modified.
Reply


Messages In This Thread
Flashdata and AJAX calls on every page load - by komirad - 01-16-2016, 07:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB