Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests and Cache plugin #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

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