I am using some javascript to do some of the heavy lifting on the dom parsing from the data tag.
It appears that changes to the javascript are not being seen by the interpreter. Like it is caching the javascript.
I have put the vxml code inside a php program to prevent caching and that seems to work, but the javascript is an include in the vxml pitched by the php program.
ie: <script src="http://www.somedomain.com/ivr/util.js"/>
Is there a way to force this out of cache manually or to force it to load every time?
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
javascript caching issue
-
- Posts: 30
- Joined: Tue Apr 18, 2006 3:05 pm
- Location: Bedford, TX
IVR example to force cache reset using maxage attribute
Hello,
The best way to force a cache reset is to use the maxage attribute or IVR *maxage global properties. For IVR example:
This will tell our caching system to refresh the cache and get the latest copy. This attribute is available for all IVR tags that request data.
Regards,
Plum Support
The best way to force a cache reset is to use the maxage attribute or IVR *maxage global properties. For IVR example:
Code: Select all
<script src="http://www.somedomain.com/ivr/util.js" maxage="0"/>
Regards,
Plum Support
Last edited by support on Tue Feb 23, 2010 2:43 pm, edited 3 times in total.
-
- Posts: 30
- Joined: Tue Apr 18, 2006 3:05 pm
- Location: Bedford, TX
placement of maxage in IVR script
maxage="0" should not go into any of your IVR scripts. It should go into the IVR tag, <script>, that references your IVR scripts.
Can you paste in a snippet of your VoiceXML code that references your javascript page?
Can you paste in a snippet of your VoiceXML code that references your javascript page?
Last edited by support on Thu Feb 25, 2010 1:29 pm, edited 5 times in total.
-
- Posts: 30
- Joined: Tue Apr 18, 2006 3:05 pm
- Location: Bedford, TX
This problem has been worked around.
I built a small html page to use the functions in my included util.js and could not access it there either. After a bunch of trial and error I determined a couple of things:
One
====
<script src="http://www.somedomain.com/ivr/util.js" maxage="0"/>
Does not work reliably if there are other <script> tags in the html.
You have to use:
<script src="http://www.somedomain.com/ivr/util.js" maxage="0"></script>
What it was doing in the html was running the code in that <script> tag, but no other <script> tags if the </script> tag was missing. Putting the /> at the end was not sufficient. I believe I tested this in both IE and Firefox.
Two
===
If there are any syntax errors in a javascript function, it appears to not register that function.
The problem is, there is no easy way to debug that problem via the vxml interpreter. So the best way was to build a simple html page and access the functions with it until all the syntax errors have been found.
I built a small html page to use the functions in my included util.js and could not access it there either. After a bunch of trial and error I determined a couple of things:
One
====
<script src="http://www.somedomain.com/ivr/util.js" maxage="0"/>
Does not work reliably if there are other <script> tags in the html.
You have to use:
<script src="http://www.somedomain.com/ivr/util.js" maxage="0"></script>
What it was doing in the html was running the code in that <script> tag, but no other <script> tags if the </script> tag was missing. Putting the /> at the end was not sufficient. I believe I tested this in both IE and Firefox.
Two
===
If there are any syntax errors in a javascript function, it appears to not register that function.
The problem is, there is no easy way to debug that problem via the vxml interpreter. So the best way was to build a simple html page and access the functions with it until all the syntax errors have been found.