Embed RSS into HTML

I would like to embed an RSS feed from a site of mine into another site. Is there any free service that can do this for me or a way I can insert the HTML or javaScript?………………………………………… You can provide the link to the …

via HTML Language Development » Search Results » ajax:

Embed RSS into HTML

I would like to embed an RSS feed from a site of mine into another site. Is there any free service that can do this for me or a way I can insert the HTML or javaScript?
…………………………………………

You can provide the link to the current page’s RSS like so: But to have it visible in a web page, you’ll need to use at least a server side script if no JavaScript is used. It’s not available in plain HTML.
…………………………………………

JavaScript will not be able to load an RSS feed from a different domain; a page on domain A is not allowed to make a simple GET request to domain B because of security restrictions. However, if you build a proxy under the same domain using your server-side language of choice, your JavaScript can load the content from there. Here’s a really simplified example using jQuery on the client and ASP.NET on the server.
Client:
$.get(‘Proxy.ashx?feed=http://stackoverflow.com/feeds’, function(data)
// Do something with the feed
);Server:
public class Proxy : IHttpHandler

public void ProcessRequest(HttpContext context)

using (var webClient = new WebClient())

context.Response.Write(
webClient.DownloadString(context.Request.QueryString[“feed”]));

}
}
…………………………………………

You can easily use jQuery to pull the RSS (its an XML Format) with a $.ajax(‘http://pathToRssFeed’) and then format it and put it into the page using something like jQuery Templates. It’s very simple.

For more info: Embed RSS into HTML

HTML Language Development » Search Results » ajax

Embed RSS into HTML

Share this post:

Related Posts

Leave a Comment