Dictionary vs WebStorage !?

Get help using Construct 2

Post » Mon Mar 23, 2015 11:52 am

I am searching these forums but just cant find a clear answer...

What is the difference between Dictionary and WebStorage and when to use one and when to use the other?

(I am trying to create simple web based photoalbum and i want users to check certain chackboxes and make their prefered selection and then acording to that download certain photos).

please enlighten me someone!!! :D
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Mon Mar 23, 2015 2:11 pm

The dictionary is a file in your project.

Web storage is data saved in your browser.

I would use the dictionary for predetermined content, and web storage for dynamic user settings/scores.

In your case, I would go with web storage.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Mon Mar 23, 2015 4:16 pm

@lennaert

Thank you... so i will be using WebStorage to store local user choices.

i have one more doubt:
when app downloads immages from server, where are they exactly stored?
can i save them into my own folder ... and if yes, how can i do that? (into that dictionary)?

Thanx!!!!!
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Mon Mar 23, 2015 5:06 pm

The images from a c2 app are downloaded to your browsers cache/temporary files.

I do not understand what you mean with saving them to your own folder.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Mon Mar 23, 2015 5:22 pm

@lennaert
Well, i need to manipulate with them:
I would like to save them localy so that user don't need to redownload them every time he opens the app (theres a lot of immages) and then to delete those that are expired beyond certain date.
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Mon Mar 23, 2015 6:36 pm

pfew ... thats ... well .. I am not to sure about the approach your thinking off, but .... you could try to store the images as base64 code in the webstorage, or even in an array and either save the app, or store the array somewhere ....

Perhaps some research is in place to check how much you can actually save in various storage methods ... seeing as images tend to get big quick.


web storage tut
https://www.scirra.com/tutorials/1152/i ... simplified
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572


Return to How do I....?

Who is online

Users browsing this forum: Artcadev and 26 guests