Cracking the XML update problem
Monday, November 24, 2003 by _Martin_ | Discussion: WinCustomize News
Your PCs cache is usually a good thing, but where DX objects using XML feeds are concerned it can be a pain.The reason for this is that most users don't set their PC to check for a new page each time, but rather reload from the cache, especially if it's the same day.
Fortunately there is a solution!
The logical solution is that you ensure that the DX object checks for a new page every time. The best way to do this is to actually send the user to a different page every time.
What! How is that going to work?
Well, most XML feeds work on a parameter basis. What's cool about this is that if a page receives a parameter it doesn't recognise, it ignores it. Are you getting a hint here? Well yes, the solution is to append a dummy parameter to each request.
Let's take a weather object for example:
The normal request is this:
http.Open "GET", "http://xoap.weather.com/weather/local/" & Object.PersistStorage("zipcode") & "?cc=*&dayf=5" & str_RANDOM_URL, False
Now, lets amend that:
Randomize
str_RANDOM_URL="&rnd=" & rnd()
http.Open "GET", "http://xoap.weather.com/weather/local/" & Object.PersistStorage("zipcode") & "?cc=*&dayf=5" & str_RANDOM_URL, False
All of a sudden, the browser is being requested a brand new page due to the random number. The webpage returned is the same as what would normally be returned, but now you get it as and when the timer requests it.
The weather objects have been updated here:
DX2 Weather ( https://www.wincustomize.com/skins.asp?library=3&skinid=2725 )
DX2 Weather (Animated) ( https://www.wincustomize.com/skins.asp?library=3&skinid=2828 )
Mattahan Weather ( https://www.wincustomize.com/skins.asp?library=3&skinid=2892 )
Hope you guys find the tip useful!
Reply #2 Monday, November 24, 2003 9:04 PM

Reply #5 Wednesday, November 26, 2003 9:42 AM
anyone ever get any of them to work for Canada??
i've tried the international one,
i've tried putting city instead of zip code,
works fine on weather.com web page etc.. but not for app.
IE: objectdock, weather one,
Help,, i really want weather on object dock or desktopx.
have v1 of ODock and v2 of DX.

Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!








Reply #1 Monday, November 24, 2003 8:21 PM
Smart move, martin and the orginial inventor, if not same person.