Refreshing Remote House Ad.

Jan 21, 2014 at 11:30 AM
Edited Jan 21, 2014 at 12:17 PM

I use AdRotatorWP.1.0.3 in my Silverlight Windows Phone 8 app.

Is there a way to force refreshing the remote house ad without reinstalling the app, so that users could see a new remote house ad when restarting the app?

The ad seems to be cached so that when I update the remote ad, it is not updated in the app. Will the cache expire after some time?

Jan 21, 2014 at 12:22 PM
The control should download and upadte the local cache on every run of the application, it only looks at the cache if the network is unavailable.

However we have noted in the past that the phone's OWN IE cache does play a part and if there is not sufficient difference between the online and the IE cached version then it will intelligently not download and just deliver the IE cached version.
Either ensure that any changes to the remote ad are significant or allow about 48 hours for the phone IE cache to expire.
(Caused quite a few head scratching moments testing that one)

Let me know if this helps.

We could add a force cache delete for AdRotator but there is no programmatic way to clear the IE cache other than the user going in to the IE settings page
Marked as answer by aalstes on 1/26/2014 at 10:33 AM
Jan 21, 2014 at 3:15 PM
Thanks for this info!

Not sure how significant the ad change would have to be. I added lots and lots of controls to the XAML, but the ad did not refresh (not sure if it could even have rendered correctly, though).

I also tried emptying the IE cache, with no effect.

However, I can see in my Apache log that my app has fetched the remote ad earlier today. Unfortunately it fetched an unchanged ad. Now I made a small change to the ad to test if the ad will indeed update within 48 hours. I guess that would be acceptable for my needs. After all, all I want to do is to be able to send all my millions of app users any message I want, once I get those users first! :) I really like your ad rotator's ability to dynamically load XAML from the web.

By the way, here's the log output when debugging:

AdRotatorControl_Log: Ads are enabled for display
AdRotatorControl_Log: Ads being requested for: DefaultHouseAd
AdRotatorControl_Log: DefaultHouseAd Created
AdRotatorControl_Log: Ads being served for: DefaultHouseAd
AdRotatorControl_Log: Ads being served for: DefaultHouseAd
AdRotatorControl_Log: Ads being successfully served for: DefaultHouseAd

Jan 22, 2014 at 2:48 PM
Yes, we are keen to get the House Ad re-implemented in the V2 scope because it is such a critical feature. Not just for delivering your own ads or a placement ad if none available.
But for the ability you suggest where you can inform users for the app status, downtime or known issues when need be. I've seen some implementations just using it for this alone. Downside in V1 is that you still have to ship all the providers DLL's even if you don't want to use them, which was one of the primary goals to break in V2, only ship DLL's you want and in the case of this scenario, none.
Jan 25, 2014 at 2:27 PM
Yes, the remote house ad is a really good invention.

Unfortunately, my app still shows the old version of my ad. Perhaps something goes wrong and it shows the local house ad, which still has the old text. I think I will grab the source code for the ad rotator and debug a little...
Jan 25, 2014 at 4:45 PM
Getting the source code was the right thing to do. Being able to debug is always great. The reason the remote ad did not show was that it caused a parser error, xClassCanOnlyBeUsedOnLoadComponent... Removing the x:Class part fixed it.

Thanks for your help! I will do some more testing later.
Jan 25, 2014 at 5:20 PM
Lol. Yes, we protect against bad xaml but granted we don't register an error for it in v1.

will be sure to add some better logging for this in V2 when we re-introduce this feature
Jan 26, 2014 at 5:35 PM
Works like a charm now. :) +1 for improving the logging. :)