|
-
Browser cache and updated websites.
Another brief question.
I'm no expert in the field, and I'm creating my company website with Koolmoves.
The entire site is a flash swf sitting in an html file. What I noticed is, when I upload a new updated version of the movie, my browser picks up the cached movie instead.
In order to get the updated site to load, I need to clear my browser cache and refresh. This is understandable, but some people who are going to view my site don't know this.
How do I get their browsers to properly and automatically load the newest up to date website, instead of displaying the out of date version of the site they might have on their website?
-
Senior Member
Annoying isn't it...............
You can google for 'no-cache' etc for information on the subject..it can be tricky as different browsers behave in diffent ways.
One suggestion is to add a random query onto the swf address in the html page...eg
yourflash.swf?bogus=randomstring for both object and embed tags..
This could be manually changed when you update your flash.
This will cause the browser to think that the flash is a different file therefore not loading from the cache whilst the flash will simply ignore the bogus variable.
Hope this makes sense
regards
mike
-
So what 'ur saying is, I can sort of put a SWF version tag in the URL string...Mmmmm. Sounds like it might work!!!
Thanks Mike, I'll look into that!!!
-
I think I've found a solution, it's in the back of my head, and will be tried. When I want to upload my new .swf movie, I'm going to do so, but upload it simply with a different filename.
Will this word? Or will the index.html file fool around and have the old file loaded in any case?
-
Senior Member
Yes a different filename will certainly work as long as the html page is refreshed..ie up to date which is more likely as the browser should detect that the html file has changed....but adding the no-cache code to the html might be worth doing as well..
Just a thought...what if your wrapper is in php.(still with the changed flash file name)...might be worth a try...or
If you have a dummy preloader which then loads the main movie using loadmovie..............if the dummy is cached it may not matter as the main movie is called by the flash and not by the browser if you see what I mean.
or...with either of the above have a text file on the server with the latest filename which is read to point to your latest flash.....
It all sounds a bit drastic but browsers can be stubborn for example I have a flash chatroom I alter now and then and its not uncommon for users to come in with a version which is months old ... I use zero cache now we have adsl and it makes life a lot simpler..
have fun
mike
-
Thanks mike
I'll check out no-cache, but here in South Africa, most people cannot afford broadband yet, as the only telecoms company here is ripping us off. We pay 800% more than you guys elsewhere in the world.
Anycase, I'll keep your advice in the back of my head, as legislation is changing and broadband will eventually become cheaper.
Thanks for the advice!!!
-
Senior Member
Okies.....google for no cache pragma though its not 100% guaranteed from what I read so one of the other methods I mentioned might be worth a try 
We pay double here for broadband due to a local monopoly and the weather is cold and wet...lol
good luck
mike
-
On the Broadband, in South Africa, we pay about $5000 per month. Then the circuit runs at 512kbps, and they cap you at 3GB.
Government here has just licenced a first "Second Netword Operator" to initiate competition and to break the monopoly. Liberalists, forums and TV shows are constantly exposing the monopoly exploiting the public, milking us for every cent we earned.
Anycase, wish I had a nice debugger to do sort of like a Debug Run so I can see step by step whats happening in my code. Koolmoves doesn't have a debugger, and its a bummer.
I've used Visual Studio before, man, you can watch and literally look into almost any variable at any time, while your code is running. Koolmoves needs that. I think Flash has it but I'm not sure.
I'm babbling a lot now, think I'm tired now....
-
KoolMoves Moderator
Loadmovie sometimes pulls from the cache too I think
-
If you would want a site with a preloader you could create a separate one. Using the MovieClipLoader class it's not very difficult to create a small preloader and load the main movie followed by '?' and a changing value to prevent caching. That way it's also pretty easy to create a one day cache or so by using a value that's based on the date. The separate preloader could also do a player check in case you need flash 8.
-
Senior Member
On the Broadband, in South Africa, we pay about $5000 per month. Then the circuit runs at 512kbps, and they cap you at 3GB.
Yep a preloader with a random querystring sounds a good one...my votes with that approach.
mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|