开发者

Flash image rotator - does it cache xml?

开发者 https://www.devze.com 2022-12-13 10:02 出处:网络
I\'m planning to use flash image rotator based on xml where are defined paths from all images that will be rotated. What I wanted to do is to use this rotator for random images rotating. Each time pag

I'm planning to use flash image rotator based on xml where are defined paths from all images that will be rotated. What I wanted to do is to use this rotator for random images rotating. Each time page is refreshed new xml file is created (existing one is replaced with new one). Well, I was thinking and came to this: - user A visits page, a xml file is c开发者_如何学Pythonreated with paths to some random 10 images, images are starting to rotate - while user A is watching slideshow, user B comes to page and then existing xml is being replaced with new one. Will this effect user's A slideshow?

To be more concrete: Does flash file first reads whole xml file, stores it in it's memory and reads from memory or it reads first line of xml and executes it, then second line and executes it and so on...


Reads the whole thing. You'll be safe with what you've got. You might want to add a cache breaker to the end of the XML request too by attaching a random number on the end of the query string:

www.myserver.com/xml.asp?random=189473737


@ Pete Duncanson First, thanks for answering so fast :)

I'm not pretty sure if I understood you... this is example xml of jw flash rotator in which I inserted random query at the bottom of xml file:

<?xml version="1.0" encoding="utf-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
    <trackList>

        <track>
            <title>Predvečerje na Starom Gradu</title> 
            <location>http://localhost/sinj.com.hr/rotator/home/1.jpg</location>
        </track>

        <track>
            <title>Kamičak - kula sa ugrađenim satom</title> 
            <location>http://localhost/sinj.com.hr/rotator/home/2.jpg</location>
        </track>

        <track>
            <title>Pijaca - središnji trg</title> 
            <location>http://localhost/sinj.com.hr/rotator/home/3.jpg</location>
        </track>

        <track>
            <title>Detalj sa ulaznih vrata u Crkvu</title> 
            <location>http://localhost/sinj.com.hr/rotator/home/4.jpg</location>
        </track>

    </trackList>
</playlist>
http://localhost/sinj.com.hr/?random=123987123

Is this correct or "end of the XML request" is some other location? Thanks, Ile

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号