Skip to content

Tests and Cache plugin#2

Open
tcha-tcho wants to merge 3 commits intorezitech:masterfrom
tcha-tcho:master
Open

Tests and Cache plugin#2
tcha-tcho wants to merge 3 commits intorezitech:masterfrom
tcha-tcho:master

Conversation

@tcha-tcho
Copy link

Hi,

I did start a create a new plugin to stash and create some tests to the actual code. The new experimental plugin allow the user to save scripts, css and jsons on localstorage and use them whenever the user is on-line or off-line.

I did some testing and so far the things are working fine. Because the problem with cross-domain the test will only pass on safari and ios. But the general idea work as expected.

I hope this could help.

The general API is quite simple. You just need to change the 'src' to 'src-cache':

  <script type="text/javascript" src-cache="http://code.jquery.com/jquery-1.10.1.min.js"></script>
  <link rel="stylesheet" type="text/css" href-cache="http://jquery.com/jquery-wp-content/themes/jquery.com/style.css">
  <script type="text/javascript" jsonp-cache="http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=processJSON&tags=monkey&tagmode=any&format=json"></script>

Please, evaluate if its a good change for your code.

Is still missing the minified versions.

Thank you
Tcha-Tcho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant