-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prevent show when user press back button in browser? #21
Comments
I have the same problem. When I press the back button without edit some item I get the sweetalert. |
@izcream @jolusadev Hi, this is related to how the data is passed to the laravel session driver. A way to solve this is by forget the message after displaying it:
|
Thanks for your anwser. That code not work for me. I think is a navigator cache problem with sessions. |
i tried that code but isn't work for me too. |
Try reload page when alert window closes |
This is an issue related on how the browser's cache and cookies work, i think is not an issue with Laravel neither the package. |
@uxweb Probably is still here. Back button just re-runs the JS in cache (so SWAL shows again) Maybe there should be a default functionality to "show once" somehow - not sure though... perhaps set a variable
Not sure if that var will keep scope though after you press the back button...?? |
Try this |
So what the best solution to solve this problem? |
this is work with blade in laravel 8 |
this worked for me |
I use this package in my projects and i found some problem, ex: when i created some product success alert will show. it's work correcty but when i go to create product page again and press back to previous page alert will show up again. how to resolve that?
ps.sorry for my bad english
The text was updated successfully, but these errors were encountered: