refreshing page increases number of duplicate masseges sent
25 views
Skip to first unread message
Светозар Волков
unread,
May 17, 2017, 3:10:25 AM5/17/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Faye users
Hello everyone! I develop web application using Faye and every time i click button it should send a message to the server, but if i refresh page it sends two messages at once. Every time i refresh page the number of duplicate messages increases by one. Can anyone explain what can the reason be? Thanks a lot!
James Coglan
unread,
Jun 3, 2017, 8:04:52 AM6/3/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to faye-...@googlegroups.com
This sounds like there is state hanging around between page views, i.e. you old event handlers for the button are sticking around each time you refresh the page.
Can you explain more what you mean by "refreshing the page"? Is this a single-page web app where a new "page" is loaded with JS, or is it genuinely a new page from the browser's point of view? Are you reusing a Faye client across page views? Is there any way your event handlers for the button could be being added multiple times?