Published on November 24, 2003 By _Martin_ In 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!

Comments
on Nov 24, 2003
Cool! I added it to textweather and it worked!

Smart move, martin and the orginial inventor, if not same person.
on Nov 24, 2003
for some reason i cant get my weather to work at all.........weather object loads but i cant get my weather to come up its not even giving me a choice to change zip code am i missing something
on Nov 24, 2003
never mind i got it
on Nov 25, 2003
Original credit to Mr Google.com
on Nov 26, 2003
Ok, i've read about the weather objects and read tips on fixing scripts,, however, i don't do "languages"
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.