03 October 2008

NFL and cache issue

With my new phone and Mocket's SWF2NFL, I tested NFL deployment.

2 ways to do it under Apache :

  1. add 'application/vnd.nokia.flashlite-archive[insert_tab]nfl' on the file 'mime.types' (see TypesConfig in your 'httpd.conf' to know where it is) then restart apache with apachectl restart

  2. create/update a '.htaccess' file on the folder when you uploaded the NFL and add 'AddType application/vnd.nokia.flashlite-archive nfl' inside (works only if .htaccess are authorized via 'AllowOverride All' in the 'httpd.conf')



I uploaded 'test.nfl' on the correct folder of my server and downloaded it to my mobile throught Opera Mini.
After some tests, I found a bug and so updated 'test.nfl'.
I then tried to download the new version to my mobile but I was unable to overwrite the previous one, I so gave it a new name 'test1'.

Problem step 1 :
I don't have 'test' and 'test1' but 2 'test' files.
I so thought it was because I used the same version number.
So I made a new 'test.nfl' with a new icon and a new version number.

Problem step 2:
Download, call it 'test2' and....3 'test' files on the folder with the same icon !

Problem step 3:
Ok...I deleted these 3 files, cleared cache from Opera and restarted download to another folder...Still the old one!
I'm lost : old one was 12ko, new one is 23ko...Opera tell me it is about to download a 23ko file and...I have the old 12ko on my mobile ?!

Answer :
After some googling, I found a link to clear 'nokia cache'
I followed the instructions, restart the download and....finally got my 23ko file !

Conclusion:
I must say I'm a bit disappointed...
1/ an user can't update (overwrite) a file
2/ if cache isn't cleared, user still download the old one

Note, I don't know the life time of the cache but it can be an issue.
I wasn't aware of download caching, it's my first experience : always delete a file and clear cache before downloading the new version.
It still strange for me to have to clear Opera cache AND Nokia cache to download the right file.

I also know why the files kept 'test' as name, it's the FL-Name which is used, not the filename...but I must say it's strange to have 3 differents files with the same name !
Why not use this FL-name and FL-version to update the file, not create a new one ? or use a FL-UID ?

Well, first step to easier deployment....for easier ONE SHOT deployment. Forget about update.

If your phone doesn't work the same way, tell me !

No comments: