Start a new topic

Wikitude SDK cache behavior

Hello,

 


We have an iOS app integrated with Wikitude SDK. My WTC file and the script file hosted on a cloud server. All the metadata (Augmentations, URLs, Images etc.) related to each target is stored in the script file. When we need to change the metadata of the targets, we will update the script file and upload it to the server.


Recently we have updated some URL information in the script file. After that update, we got a considerable amount of user feedbacks which is they did not get the update correctly. Then we conduct a test and found the Wikitude SDK did not get the latest script file from the server in some networks. When we have the issue, even reopening the app will not solve the problem.


I have the following questions.

  • How does the Wikitude SDK handle the cache of the script file?
  • Do we have a control over the cache in the Wikitude SDK? Maybe a setting or a property to change.

Any ideas?


Regards,

Buddhika



Hello Buddhika,


When you write you updated 'some URL information in the script file', does that mean that you updated the metadata content for a target or did you update the assets as such? If you load a JavaScript file dynamically you need to handle the cache control on your own in the HTML (see code snippet below). Does that help?


Regards,

Chris


 

<!-- disable caching -->
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1">

 

Thank you Chris,


Sorry for the confusion. I mean I have updated the metadata content for a target, not the assets on the HTML or JavaScript.


I'm loading the JavaScript file from the HTML page and it didn't have cache control tags as you mentioned. That might be the reason to not get updated the JavaScript file on some networks. Correct?


Regards,

Buddhika


Yes, I guess that this is the solution :) 

Feel free to post in this thread if it doesn't resolve the issue.


Regards,

Chris

Thank you Chris. 


We will implement it and post the details here, if it's didn't resolve our issue.


Regards,

Buddhika


Login or Signup to post a comment