XStandard Web Services And Random URL Parameters

Posted July 26, 2006 at 1:16 PM

Tags: XStandard WYSIWYG

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:

 Launch code in new window » Download code as text file »

  • <!--- 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.

Download Code Snippet ZIP File

Post Comment  |  Ask Ben  |  Permalink  |  Print Page



Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

There are no comments posted for this web log entry.


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 21, 2009 at 6:47 PM
Hal Helms - Real World Object Oriented Development, Sarasota - Day Five
@charlie griefer, Thank you.. ... read »
Nov 21, 2009 at 5:15 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jose Galdamez, Oh heh yeah I didn't paste the whole code. I should have defined the vars -- my bad. It's fixed thou. Thanks. ... read »
Nov 21, 2009 at 4:49 PM
Styling The ColdFusion 8 WriteToBrowser CFImage Output
Great work yet again Ben! Whilst I didn't use this whole code, I copied some of your regex code for a similar problem with the lack of an alt attribute and unescaped ampersands in CFIMAGE for Railo 3 ... read »
Nov 21, 2009 at 1:13 PM
My First ColdFusion Builder Extension - Encrypting And Decrypting CFM / CFC Files
@Ben, Because I am pedantic, I just want to make sure that everyone knows there is absolutely no encryption going on. There is only encoding and obfuscation. The cfencode tool only obfuscates your C ... read »
Nov 21, 2009 at 12:28 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jody I can't seem to get your code sample to work. If you are still having problems, try this code out and see if it gets you what you wanted. <!--- Comma delimited list with various duplicates ... read »
Nov 21, 2009 at 11:03 AM
Groovy Operator Overloading Does Not Work In The ColdFusion Context
Hi Ben, Thanks for this informative post. Now I am reading ur old posts too ... read »
Nov 21, 2009 at 10:56 AM
HostMySite.com Has The Best ColdFusion Hosting
@Mehul, Yes very nice people, however several downtimes per day which was not acceptable. Hence we had to move out. I am glad you are having good luck with them so far. ... read »