Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6735151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:58:29+00:00 2026-05-26T10:58:29+00:00

I want to detect if a feed has changed, the only way I can

  • 0

I want to detect if a feed has changed, the only way I can think of would be to hash the contents of the xml document and compare that to the last hash of the feed.

I am using XmlReader because SyndicationFeed uses it, so idealy I don’t want to load the syndication feed unless the feed has been updated.

XmlReader reader = XmlReader.Create("http://www.extremetech.com/feed");
SyndicationFeed feed = SyndicationFeed.Load(reader);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:58:30+00:00Added an answer on May 26, 2026 at 10:58 am

    A hash approach won’t work in this case due to an XML comment added by some server side caching which constantly very frequently even when the actual feed never changes.

    One thing you can do which works for this feed is use HTTP conditional requests to ask the server to give you the data only if its actually been modified since the last time you requested.

    For example:

    You’d have a global/member variable to hold the last modified datetime from your feed

        var lastModified = DateTime.MinValue;
    

    Then each time you’d make a request like the following

        var request = (HttpWebRequest)WebRequest.Create( "http://www.extremetech.com/feed" );
        request.IfModifiedSince = lastModified; 
        try {
    
          using ( var response = (HttpWebResponse)request.GetResponse() ) {
    
            lastModified  = response.LastModified;
    
            using ( var stream = response.GetResponseStream() ) {
    
              //*** parsing the stream
              var reader = XmlReader.Create( stream );
              SyndicationFeed feed = SyndicationFeed.Load( reader );
              }
            }
          }
        catch ( WebException e ) {
          var response = (HttpWebResponse)e.Response;
          if ( response.StatusCode != HttpStatusCode.NotModified )
            throw; // rethrow an unexpected web exception
          }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to detect when the document has just started to load, so that
I want to detect events like Video is playing Video has been paused Video
I want to detect emails in text format so that I can put an
I want to detect if the user has already installed google chrome rss plugin
I want to detect (preferably through an event) when any content is added, changed,
I want to detect multi accounts in a browser game: If a user has
I want to detect collision between two bodies, one body has circle shape and
I want to detect motion in a quick way before tracking, will absDiff() (or
I want to detect Empty paragraphs in Word Document using Microsoft.Office.Interop.Word. Suppose, if my
I want to detect the browser language so I can switch languages when people

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.