简体   繁体   中英

How to update my RSS feed when data changes?

I am creating a RSS feed based on the data present in my database (SQL server 2008). I have done it in asp classic. My question is how will I be able to update my feed automatically when data in the database changes?

You need to generate RSS on demand . It could be a url your consumer is using the get latest rss feed. You can generate the RSS when that url is being access and return the response in form of RSS with latest changes.

Edit based on comments.

You can use jQuery ajax to periodically call method on server that generates the RSS and you can also get RSS from this method. This link expalins you to use jQuery and web method to send server call.

You can use javascript setInterval to periodically send ajax call.

setInterval(function() {
  //your jQuery ajax code to check if you have updated RSS
}, 5000);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM