pivotal/cacheable-flash — Issue #3: ajax causes cookies not to get cleared
Author: davich
Created: 2011-12-07 21:51:43+00:00
State: open

I'm having an issue where as the page is rendered, an ajax call is made before the "flash" cookie is cleared (which sends the "flash" cookie to the server). The "flash" cookie is then cleared by the cacheable-flash javascript snippet. But when the response from the ajax call returns, it resets the "flash" cookie its previous value.
This means that flash messages are persisting over multiple pages when they should just appear on one.

ajax call (with cookies) -->
cookie cleared
<-- ajax call returns (with old cookie values)
same cookie value is set as step 1.