• When including xml files or when you load xml files, there's always an issue of flash caching the xml. I solved it on different place in my html and by generating a number and use that as parameter to fake a new file. But I was wondering can't krpano do this automagicly? <include url="test.xml" nocache="true" />

  • Hi,

    first - there are two types of caching:

    1. the caching from the browser
      that can't be controlled by krpano, but by sending the right http headers,

    2. and the krpano internal caching
      there is a internal buffer that caches all kind of request files to avoid downloading the same file two times,
      it can be disabled by:

      <network caching="false" />

      but I wouldn't recommend that,

    but a other solution is also possible - there is a way to use variables in paths (but these variables must be set or exists before),
    this would be the template syntax: %$variable%

    with that you could add a get request with a 'random' variable,

    <include url="test.xml?%$random%" />

    best regards,

  • Thanks Klaus :) That last one would solve alot of problems.

    But a quick question, that random, generates a random number. but that would reload a file every time. Is it possible to give it a range based on time? For instance what I do in flash is generate a number based on the date on 1 jan 1970 in ms, divided in minutes (/6000) or 5 min (/30000). So that would create a number that changes every minute (and not every time. thats better for server caching. Would that be possible? (generating a number based on time?)

  • Hi,

    any variable could be used with that syntax in the url path,
    but the variable must be set before loading the xml itself (variables that were set in the html will be set after when the loading of the xml was done)

    e.g. in dynamic code:

    set(timestamp, ....);

    and in the xml there:

    <include url="test.xml?%$timestamp%" />

    why do you need refreshes every time?
    is your xml so dynamic?
    if it's just for testing I would recommend just to clear the browser cache after each change...

    best regards,

  • No I dont want it to refresh everytime.

    Let me describe our common situation:

    We Build a tour,
    upload it,
    email customer,
    customer has feedback. I dont like this color, can you make the hotspots bigger, the text has a type etc
    we edit the tour,
    upload to the same folder,
    email customer
    Customer says, I dont see things altered.

    Now my boss asked me to come up with a solution for this common problem.

    So I want the tour refresh certain elements (or just plain everything). But not EVERYTIME, Not Every click, Not every panorama. I can imagine a user spending 6min in a tour, clicking a round, but you dont want to reload every reusable element of the interface, or reloading globalconfiguration.xml thats included in every panorama xml.

    But on my end, I dont want to edit some variable to a higher number (version number) and cross reference that to see if stuff changed. Nor do I want to upload new content to a new folder or different way.

    So my solution was in my Flash interface, a timestamp that changes every 5min by taking the date from 1 jan 1970 (new Date()) and divide that with 5 * 60 * 1000 (5min in ms). So it has a new variable every 5min. This works fine for the Interface bits, but a great deal is still handled in krpano, and now Im looking for a similar solution I did in my Flash interface.

    The set(timestamp, ... ); loadpano etc could work if I could generate a number every 5min (like I do in flash). Is this possible, or should I look @ javascript solution. Or should I make a function callback to my interface and let flash generate that number and send it back to krpano (seems slow)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!