In response to observed, unexpected behavior, I made a minor tweak to our PHP script that does the RSS to JS magic, using JavaScript to embed RSS content in any page.

The probllem was on the simple way I was naming my cache files (the RSS parser I use creates cache files to ease the load on your server)- previously it based the cache file on just the path and file name of the RSS feed, so in some cases people were getting feeds from other sites (bad).

Now cache files are based on the entire URL, as to make them unique. The change would not likely affect someone running our PHP script to generate feeds from their own sites- it is more of a problem like ours, where when I cleaned the cache directory, I saw nearly 500 cache files.

Your mileage may vary.

The post "RSS2JS Script Fix" was originally cracked open and scrambled from a rotten egg at CogDogBlog (http://cogdogblog.com/2003/10/rss2js-script/) on October 13, 2003.

6 Comments