history.nette.ajax.js icon indicating copy to clipboard operation
history.nette.ajax.js copied to clipboard

use localStorage for snippets cache

Open Ciki opened this issue 10 years ago • 4 comments

Ciki avatar May 02 '15 16:05 Ciki

However, I'm not sure now this is the right approach as it does not handle situations when localStorage is full (5MB)

Ciki avatar May 02 '15 16:05 Ciki

Very useful! +1

Tomas2D avatar Jun 05 '16 19:06 Tomas2D

@Ciki I think you can you something like localStorage.removeItem(snippetsOrHash); in loadSnippets function

becygroup avatar Aug 12 '16 14:08 becygroup

It might be useful to make methods loadSnippets and saveSnippets available from outside this extension, so you can use them in another custom extensions. Eg. $.nette.ext('history').loadSnippets(...) as is in your forked repository.

zipper avatar Dec 07 '16 10:12 zipper