Skip to main content
Ben Nadel at cf.Objective() 2010 (Minneapolis, MN) with: Doug Hughes and Ezra Parker and Dan Wilson and John Mason and Jason Dean and Luis Majano and Mark Mandel and Brian Kotek and Wil Genovese and Rob Brooks-Bilson and Andy Matthews and Simeon Bateman and Ray Camden and Chris Rockett and Joe Bernard and Dan Skaggs and Byron Raines and Barney Boisvert and Simon Free and Steve 'Cutter' Blades and Seth Bienek and Katie Bienek and Jeff Coughlin
Ben Nadel at cf.Objective() 2010 (Minneapolis, MN) with: Doug Hughes Ezra Parker Dan Wilson John Mason Jason Dean Luis Majano Mark Mandel Brian Kotek Wil Genovese Rob Brooks-Bilson Andy Matthews Simeon Bateman Ray Camden Chris Rockett Joe Bernard Dan Skaggs Byron Raines Barney Boisvert Simon Free Steve 'Cutter' Blades Seth Bienek Katie Bienek Jeff Coughlin

XStandard Web Services And Random URL Parameters

By
Published in

As I posted earlier, I was having some funkiness with XStandard caching data and showing up duplicates of stuff. I had originally thought that since my debugging (my custom XStandard configuration) was turned on, it was some how hamstringing XStandard on LARGE SOAP responses. I found out that this is not the case; after a temporary fix, the weirdness came back.

I think I have finally found a solid fix. If I put a random variable in the URL for the web service call, it seems to work well:

<!--- Attachment library. --->
<param
	name="AttachmentLibraryURL"
	value="...[long url]...&rand=#RandRange( 1, 1000 )#"
	/>

The randomness of the "rand" URL parameter forces the server and the browser (or whatever XStandard's internal mechanism is) to think the web service call is unique and therefor cannot use any kind of caching mechanism. Now, this is not for EVERY web service call; the randomization only occurs when the browser is first loaded... but, this seems to take care of the problem.

I have had this in place for a day and so far nothing out of the ordinary. Now, again, I don't know how XStandard works under the hood, and I am not convinced this was the correct solution or that it has anything to do with this, that, and the other. For all I know, me restarting my computer last night could have been the fix. Either way, it's all good at the moment.

Want to use code from this post? Check out the license.

Reader Comments

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel
Managed hosting services provided by:
xByte Cloud Logo