Hi,
I have a news home page and it has multiple sections one of them is today’s latest news headlines.
I want to implement this section in this way, if any new headlines will change then "latest news headlines" that content should update on the page also without refreshing/reloading a complete page.
do I need to add an event listener, maintain the session, or need to use time intervals?
Can someone suggest me best approach for this?
Solved! Go to Solution.
Views
Replies
Total Likes
You can write a servlet which will give you latest headlines, and call that servlet at regular intervals of time according to your requirement.
once you got the response , change the DOM accordingly.
Jquery functions are there to delete the DOM elements and then append again with new response
triggering servlet at regular intervals, m sure some jQuery function will be there to do that.
There could be others way to implement this. This one could be simple more traditional way to do this.
You can write a servlet which will give you latest headlines, and call that servlet at regular intervals of time according to your requirement.
once you got the response , change the DOM accordingly.
Jquery functions are there to delete the DOM elements and then append again with new response
triggering servlet at regular intervals, m sure some jQuery function will be there to do that.
There could be others way to implement this. This one could be simple more traditional way to do this.
@Abhishekty Use any FE framework to achieve this.. there are many ways to achieve a partial DOM refresh without need of page refresh.
Thanks @Varun_Shakya , @Shashi_Mulugu
Views
Likes
Replies
Views
Likes
Replies