02-09-2006, 09:28 PM
|
#1
|
|
Registered User
Join Date: Feb 2006
Posts: 21
|
Flash 8 - XML - Cache
Hi!
I am developing an application with Flash and XML. This application retrieve all the information from the XML.
My problem is that, these XML has information that I don't want people know... and it starts when the swf and xml files are cached by the browser/flash player
* - I am using Flash 8,
* - XML is not encrypted (Is this a good solution?),
* - ActionScript 2.0,
How about another solution?
Please, let me know if there is any information you need to help me...
Thx lot,
nitz
|
|
|
02-09-2006, 10:15 PM
|
#2
|
|
HK510
Join Date: Nov 2001
Location: Montreal
Posts: 290
|
hi nitzicuile,
when you load your xml file using xml build in method, load an asp or php file
that generated xml content. That way your xml wont be cached by the browser.
The only downside of this is that you cannot preload it. You have to wait for the onload method of the xml class.
|
|
|
02-10-2006, 12:36 PM
|
#3
|
|
Registered User
Join Date: Feb 2006
Posts: 21
|
Hey! thanks...
I have to ask my boss if that is the kind of solution he wants...
He was talking about encrypting information between <tabs></tabs> ...
Anyway, anything else?...
|
|
|
02-10-2006, 04:06 PM
|
#4
|
|
HK510
Join Date: Nov 2001
Location: Montreal
Posts: 290
|
I am not sure about encryption.
Sure you can encrypt your data, but to read or use, you will have to decrypt it. You will need your de-encrytion function or method in your flash. If someone decompile your flash, he will be able to get decryption methods... If he gets your xml file, he will gain access to your data.
If you use server generated xml, no one will have access to the xml data, ontly to the decryption process.
The problem with this is the amount of data to be decrypted. Imagine, you have to decrypt the info before using it...
And don't forget that there is a size limit for xml file to be loaded in flash.
It's about 70ko. Beyon that, you will see flash player run slower... I don't know if the limit have changed with flash 8, but you should read flash specs using xml. Maybe with encryption, your file size will be larger than the limit.
And if this data you want to encrypt is so sensitive, maybe you should'nt use it in your flash...
And how much time will you take to create encryption/decryption process that can be reusable... will it worth the money and time spent ?
Hope it help,
Last edited by simonboris; 02-10-2006 at 04:09 PM.
|
|
|
02-10-2006, 04:11 PM
|
#5
|
|
skin the world
Join Date: Oct 2005
Location: cyberspace
Posts: 16
|
use random number
If the problem is that you want flash to ensure to reload the xml document rather than using a cached version just add add a random number to end of url string and will reload the xml everytime!
Code:
var ranNum:Number=Math.ceil(1000*(Math.random()*(1000*Math.random())));
docXml.load('xmldoc.xml?'+ranNum);
|
|
|
02-10-2006, 04:13 PM
|
#6
|
|
I like pizza!
Join Date: Feb 2003
Location: PA
Posts: 1,310
|
I don't know what gave you that idea, but generating the XML dynamiaclly with PHP or any other server side technology does not prevent the browser from caching the XML.
The only good solution I can think of for your case is flash remoting.
|
|
|
02-10-2006, 04:26 PM
|
#7
|
|
skin the world
Join Date: Oct 2005
Location: cyberspace
Posts: 16
|
sleek, if your referring to my last comment about using the random number this is to be done in flash, it is a quick resolve to prevent the flash file using a cached version of xml and is not a replacement for remoting, this was not my intention but this can come in handy for smaller projects that need only to import a small xml docs but ensures refreshing of xml document. I have used it in many scenarios for cms for flash content in many cases.
|
|
|
02-10-2006, 04:29 PM
|
#8
|
|
I like pizza!
Join Date: Feb 2003
Location: PA
Posts: 1,310
|
Skindc, no i am refering to simonboris' comment ...
Quote:
|
Originally Posted by simonboris
hi nitzicuile,
when you load your xml file using xml build in method, load an asp or php file
that generated xml content. That way your xml wont be cached by the browser.
The only downside of this is that you cannot preload it. You have to wait for the onload method of the xml class.
|
Sorry that i was not clear about that.
Yes I am aware of your method and I use it myself, but the original poster said he did not want people to be able to see his data.
|
|
|
02-10-2006, 06:50 PM
|
#9
|
|
Registered User
Join Date: Feb 2006
Posts: 21
|
Uhmm a friend talks to me about "flash remoting"... I am going to read about it...
Maybe is the solution...
About ...
Quote:
|
If the problem is that you want flash to ensure to reload the xml document rather than using a cached version just add add a random number to end of url string and will reload the xml everytime!
|
... I do not want to reload XML, I do not want my XML to be cached on clients machine... thanks anyway! learning never ends...
|
|
|
02-11-2006, 12:45 AM
|
#10
|
|
HK510
Join Date: Nov 2001
Location: Montreal
Posts: 290
|
hi sleekdigital,
when i say server side generated xml, i mean:
PHP Code:
var f:XML = new XML();
f.ignoreWhite = true;
f.onLoad = function(b:Boolean)
{
if(b)
{
// code...
}
}
f.load("myFile.php"); // or asp or jsp
// in the server page, i render an xml opbject with header.
// so at the end, i get an xml file
// there is no way a browser can cache this.
// it is server script... and not file exist...
This work pretty fine for me...
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 05:48 PM.
///
|
|