Android Question can webbrowser used as a chatbox ?

Addo

Well-Known Member
Licensed User
i am planing to do a chatbox like whatsapp that supports animated gifs and some html tags

but also i am looking for a way to do it without lagging that can be caused by webbrowser

the html of chat box will load a style css in the header.

and i dont want to load that css each time message arrived

is there a way to set webbrowser header with a style file from local folder and append html tags without reloading ?
 

MarkusR

Well-Known Member
Licensed User
Longtime User
you can add/replace html page parts by id or class name via javascript & jquery.
css should be a separate file(s).
 
Last edited:
Upvote 0

Brandsum

Well-Known Member
Licensed User
you can use a html template having an div with a specific id that will contain chat messages.

Now you can use any websocket library like mqtt, socket.io, websocket etc to get real-time data.

So when you get any new message you can add that message using JavaScript append function.
 
Upvote 0
Top