Results 1 to 2 of 2

Thread: Cache Update After Page Load

  1. #1
    Join Date
    Oct 2006
    Thanked 0 Times in 0 Posts

    Default Cache Update After Page Load

    1) Script Title:
    Advanced RSS Ticker (Ajax invocation)

    2) Script URL (on DD):

    3) Describe problem:
    Why is a page reload required to update the RSS feed cache?

    It could not be easier to install this script, just unzip and it works. Thank you

    This is the first time I've ever looked into the detail of a AJAX script and I'm confused by how the cache is managed. I expected that the news ticker would get new news without the user having to reload the page. However, from what I can tell the only time the RSS cache file is updated, or read, is when the page with the java script is loaded. After the initial page load it seems that the java script endlessly cycles through the content loaded when the page was requested. So, if a user loaded the page on Friday, left his browser open over the weekend, on Monday the page would be cycling though the same items even if there was new news over the weekend.

    If my understanding is correct how would one modify the java script to periodically check the cache to see if it needs to be updated and potentially get new content?

    If my understanding is not correct then when when I set cache time to 0 does the cache file time stamp never change.

    Than you,

  2. #2
    Join Date
    Aug 2004
    Thanked 1,007 Times in 992 Posts
    Blog Entries


    You're right, the way the caching currently works in this script (and any other RSS/Ajax related scripts on DD) is static in that it's not just time dependant (ie: every 30 minutes), but also requires a user action that is revisiting the page in order for the feature to kick in. I'm pretty sure most DHTML scripts work off of this model when it comes to caching content. This is unlike, say, a Java stock ticker that often use the "push" model where new information is automatically pushed to the browser periodically. The reason for the "static/pull" model is simply that in most cases, it's a good enough model to serving RSS feeds while respecting server resources.

    At a glance it looks possible to modify the script to periodically check the RSS feed automatically and update itself accordingly, but honestly, it's not a feature on my list of to-dos when I get to updating this script (hopefully soon). For most people it'd be an unnecessary and confusing feature.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts