I have a question ! in method sendSSE was not contain looping, but i use inspect element and then saw in nework it ilke many response . please explain for me
you are right this is the nature of SSE to keep the connection alive. because it uses HTTP to send data from server to client instead of websocket. even if there is no new data you have to send a heart beat to keep the connection alive.
Here, a request is being hit every 2 to 3 seconds, whether a notification entry is made in the database or not, which is not the correct approach. The request should only be hit when an entry is made in the table
this is normal in SSE you can check this stack overflow question from 2013 stackoverflow.com/questions/18678727/server-sent-event-sends-data-repeatedly
@@eraufi Hello,I think he meant to say, is it possible to also make the interface update at each new notification. Like if the notification says 'new message' and I have the messages page opened, will it be possible to show new message directly on the page ?
@@yAndErESeeKeR off course. yeah it's possible. from the server you can send a custom notification and in front end where you listen to the notification in there you can create a condition to do what ever you want. like show the page. or go to other page
yes it will work. but in case if you have too many users (100+) working at same time i suggest to use a json file instead of database. in this example i have used database currently each day around 20 to 30 times people test it and it's working fine
yes you can build. but there are some limitation. like you can only send text. not images and videos because SSE dose not support Binary data, such as images or videos.
Can with work with countdown, or realtime counting across all computers?
off course .
I have a question ! in method sendSSE was not contain looping, but i use inspect element and then saw in nework it ilke many response .
please explain for me
you are right this is the nature of SSE to keep the connection alive.
because it uses HTTP to send data from server to client instead of websocket.
even if there is no new data you have to send a heart beat to keep the connection alive.
Where does the $.ajax command come from?
Is this jquery?
yes it's jquery
Here, a request is being hit every 2 to 3 seconds, whether a notification entry is made in the database or not, which is not the correct approach. The request should only be hit when an entry is made in the table
this is normal in SSE you can check this stack overflow question from 2013
stackoverflow.com/questions/18678727/server-sent-event-sends-data-repeatedly
can we use it for external apps like flutter chat app ,or react app?
yes you can
Hello...can i use this method to update data in other users tables in blade view
sorry i don't understand the question can you please explain a little bit more
@@eraufi Hello,I think he meant to say, is it possible to also make the interface update at each new notification. Like if the notification says 'new message' and I have the messages page opened, will it be possible to show new message directly on the page ?
@@yAndErESeeKeR off course. yeah it's possible. from the server you can send a custom notification and in front end where you listen to the notification in there you can create a condition to do what ever you want. like show the page. or go to other page
@@eraufi Okay thank you
which shared hosting are you using ?
infinityfree.com
is this work whatever connections numbers use it in same time ?
yes it will work. but in case if you have too many users (100+) working at same time i suggest to use a json file instead of database.
in this example i have used database currently each day around 20 to 30 times people test it and it's working fine
@@eraufi can i test this on localhost enviroment ?
@@eraufi is it work on localhost enviroment ?
@@as269 yes it will work.
@@eraufi all respect 🌹
Can we make chat app by this method?
yes you can. I already made a chat app using this method you can check it in my github repo.
github.com/ERaufi/LaravelProjects
@@eraufi thanks you ❤
I have VPS hosting and i want to make chat system with this , is it possible ?
yes you can build. but there are some limitation.
like you can only send text. not images and videos because SSE dose not support Binary data, such as images or videos.
Can this be use for a chat system?
yes. if you are in a shared hosting and can't use web sockets this we you can make
How can i find source code in the link?
you can find it in my github repo:
github.com/ERaufi/LaravelProjects
Nice content, Thanks
You're welcome
Nice video 👍
Stay connected
Helpful thanks 🙏
My pleasure 😊
thank you
most wellcome
You still nead to get some knowledge about Laravel you did lots of mistakes
could you please explain them