Skip to content

Instantly share code, notes, and snippets.

Managing HTML5 Offline Storage

HTML5 introduced many storage APIs that let you store a large amount of data locally in your users' browsers. But the amount of space allocated for each app is, by default, restricted to a few megabytes. Google Chrome lets you ask for a larger storage quota, beyond the previous limit of just 5 MB.

This document introduces you to the basic concepts around the types of storage used in Chrome and describes the experimental Quota Management API, which lets you manage your storage quota. The document assumes that you are already familiar with the general concepts of client-side storage and know how to use offline APIs.

Contents

@agektmr
agektmr / Getting $promise as a result of $resource.js
Last active August 29, 2015 13:57
I'm getting $promise as a result for fetching css using $resource. Does anyone know how to resolve?
var app = angular.module('app', ['ngResource']);
app.service('fetch', ['$resource', function() {
return $resource('css/:id/:file_name', {id: '@id'}, {
'get': {
method: 'GET',
params: {
file_name: 'style.css'
}
}
}
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@agektmr
agektmr / list_of_web_music_hackathons.md
Last active August 29, 2015 14:21
List of Web Music Hackathons
@agektmr
agektmr / ws_echo_server
Created August 6, 2012 09:28
ws echo server
var WebSocket = require('ws').Server;
var ws = new WebSocket({port:8080});
var conn = [];
// Start accepting WebSocket connection
ws.on('connection', function(socket) {
// Add socket to list
conn.push(socket);
broadcast('1 peer connected.');
@agektmr
agektmr / Twitter Like
Last active November 6, 2015 14:56
Copy and paste this code to your browser URL bar. (URLバーにコピペしてね)
data:text/html,<script>i=0;setInterval(function(){i=(i+100)%252000;document.querySelector('div').style.backgroundPositionX='-'+i+'px';},30);</script><div%20style="width:100px;height:100px;background:url(https://goo.gl/6nq9n5)">
@agektmr
agektmr / gist:5917056
Created July 3, 2013 11:05
Angular controller inheritance example
<!DOCTYPE html>
<html ng-app>
<head>
<title>Angular Example</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="styles/style.css">
<script src="scripts/angular.min.js"></script>
<script>
var ListCtrl = function($scope) {
$scope.list = [
if (DEBUG === undefined) DEBUG = true;
DEBUG && console.log('test');
@agektmr
agektmr / Installing Project Tab Manager beta.md
Last active February 3, 2016 01:40
How to install Project Tab Manager beta
  1. Download a zip file from here
  2. Open chrome://extensions on Chrome
  3. Check "Developer Mode"
  4. Click "Load unpacked extension..." and select the unzipped folder

Questions are welcome at https://twitter.com/agektmr

Keybase proof

I hereby claim:

  • I am agektmr on github.
  • I am agektmr (https://keybase.io/agektmr) on keybase.
  • I have a public key ASA18VYrnHxJ0JjmiW3VhGzGrQPzg7V1DnYvG07Mwk4xHwo

To claim this, I am signing this object: