{"action":"opened","number":35,"pull_request":{"url":"https://api.github.com/repos/code4sac/wicit/pulls/35","id":31992915,"html_url":"https://github.com/code4sac/wicit/pull/35","diff_url":"https://github.com/code4sac/wicit/pull/35.diff","patch_url":"https://github.com/code4sac/wicit/pull/35.patch","issue_url":"https://api.github.com/repos/code4sac/wicit/issues/35","number":35,"state":"open","locked":false,"title":"Cache geolocation result to localstorage.","user":{"login":"donmccurdy","id":1848368,"avatar_url":"https://avatars.githubusercontent.com/u/1848368?v=3","gravatar_id":"","url":"https://api.github.com/users/donmccurdy","html_url":"https://github.com/donmccurdy","followers_url":"https://api.github.com/users/donmccurdy/followers","following_url":"https://api.github.com/users/donmccurdy/following{/other_user}","gists_url":"https://api.github.com/users/donmccurdy/gists{/gist_id}","starred_url":"https://api.github.com/users/donmccurdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donmccurdy/subscriptions","organizations_url":"https://api.github.com/users/donmccurdy/orgs","repos_url":"https://api.github.com/users/donmccurdy/repos","events_url":"https://api.github.com/users/donmccurdy/events{/privacy}","received_events_url":"https://api.github.com/users/donmccurdy/received_events","type":"User","site_admin":false},"body":"Fixes #18. Caches geolocation result to localStorage for ~24 hours.\r\n\r\n**NOTE:** *This isn't quite ready to be merged (there's a bug in Safari I need to look into), but I thought I'd get feedback about the approach, like using localStorage as opposed to cookies or another session storage method.*\r\n\r\nThis wouldn't need to be localStorage (interested to hear your thoughts) but here's my reasoning:\r\n\r\n1. Generic session storage can be kept in cookies, server memory, or another datastore, but usually involves either (a) including it in the page body or (b) making an AJAX request for that data. Since (a) would break any future possibility of using a CDN like CloudFlare to add caching or HTTPS, and (b) would dramatically slow down the pageload, it might be better to keep this client-side.\r\n2. Cookies have rather particular encoding needs (no semicolons, commas, or whitespace) so we'd probably want to use one of the jQuery cookie plugins if we went that route. Plugins are meh.\r\n3. LocalStorage is supported on all browsers that support the geolocation API (as far as I know), and doesn't require any plugins.","created_at":"2015-03-26T06:45:48Z","updated_at":"2015-03-26T06:45:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/code4sac/wicit/pulls/35/commits","review_comments_url":"https://api.github.com/repos/code4sac/wicit/pulls/35/comments","review_comment_url":"https://api.github.com/repos/code4sac/wicit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code4sac/wicit/issues/35/comments","statuses_url":"https://api.github.com/repos/code4sac/wicit/statuses/1499759fd008299e189fbc6ec6f257a0059f3708","head":{"label":"donmccurdy:feature-localgeo","ref":"feature-localgeo","sha":"1499759fd008299e189fbc6ec6f257a0059f3708","user":{"login":"donmccurdy","id":1848368,"avatar_url":"https://avatars.githubusercontent.com/u/1848368?v=3","gravatar_id":"","url":"https://api.github.com/users/donmccurdy","html_url":"https://github.com/donmccurdy","followers_url":"https://api.github.com/users/donmccurdy/followers","following_url":"https://api.github.com/users/donmccurdy/following{/other_user}","gists_url":"https://api.github.com/users/donmccurdy/gists{/gist_id}","starred_url":"https://api.github.com/users/donmccurdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donmccurdy/subscriptions","organizations_url":"https://api.github.com/users/donmccurdy/orgs","repos_url":"https://api.github.com/users/donmccurdy/repos","events_url":"https://api.github.com/users/donmccurdy/events{/privacy}","received_events_url":"https://api.github.com/users/donmccurdy/received_events","type":"User","site_admin":false},"repo":{"id":29803329,"name":"wicit","full_name":"donmccurdy/wicit","owner":{"login":"donmccurdy","id":1848368,"avatar_url":"https://avatars.githubusercontent.com/u/1848368?v=3","gravatar_id":"","url":"https://api.github.com/users/donmccurdy","html_url":"https://github.com/donmccurdy","followers_url":"https://api.github.com/users/donmccurdy/followers","following_url":"https://api.github.com/users/donmccurdy/following{/other_user}","gists_url":"https://api.github.com/users/donmccurdy/gists{/gist_id}","starred_url":"https://api.github.com/users/donmccurdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donmccurdy/subscriptions","organizations_url":"https://api.github.com/users/donmccurdy/orgs","repos_url":"https://api.github.com/users/donmccurdy/repos","events_url":"https://api.github.com/users/donmccurdy/events{/privacy}","received_events_url":"https://api.github.com/users/donmccurdy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/donmccurdy/wicit","description":"A simple node/express app for finding locations that accept WIC in California, using data from the new California Department of Public Health open data portal.","fork":true,"url":"https://api.github.com/repos/donmccurdy/wicit","forks_url":"https://api.github.com/repos/donmccurdy/wicit/forks","keys_url":"https://api.github.com/repos/donmccurdy/wicit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/donmccurdy/wicit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/donmccurdy/wicit/teams","hooks_url":"https://api.github.com/repos/donmccurdy/wicit/hooks","issue_events_url":"https://api.github.com/repos/donmccurdy/wicit/issues/events{/number}","events_url":"https://api.github.com/repos/donmccurdy/wicit/events","assignees_url":"https://api.github.com/repos/donmccurdy/wicit/assignees{/user}","branches_url":"https://api.github.com/repos/donmccurdy/wicit/branches{/branch}","tags_url":"https://api.github.com/repos/donmccurdy/wicit/tags","blobs_url":"https://api.github.com/repos/donmccurdy/wicit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/donmccurdy/wicit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/donmccurdy/wicit/git/refs{/sha}","trees_url":"https://api.github.com/repos/donmccurdy/wicit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/donmccurdy/wicit/statuses/{sha}","languages_url":"https://api.github.com/repos/donmccurdy/wicit/languages","stargazers_url":"https://api.github.com/repos/donmccurdy/wicit/stargazers","contributors_url":"https://api.github.com/repos/donmccurdy/wicit/contributors","subscribers_url":"https://api.github.com/repos/donmccurdy/wicit/subscribers","subscription_url":"https://api.github.com/repos/donmccurdy/wicit/subscription","commits_url":"https://api.github.com/repos/donmccurdy/wicit/commits{/sha}","git_commits_url":"https://api.github.com/repos/donmccurdy/wicit/git/commits{/sha}","comments_url":"https://api.github.com/repos/donmccurdy/wicit/comments{/number}","issue_comment_url":"https://api.github.com/repos/donmccurdy/wicit/issues/comments{/number}","contents_url":"https://api.github.com/repos/donmccurdy/wicit/contents/{+path}","compare_url":"https://api.github.com/repos/donmccurdy/wicit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/donmccurdy/wicit/merges","archive_url":"https://api.github.com/repos/donmccurdy/wicit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/donmccurdy/wicit/downloads","issues_url":"https://api.github.com/repos/donmccurdy/wicit/issues{/number}","pulls_url":"https://api.github.com/repos/donmccurdy/wicit/pulls{/number}","milestones_url":"https://api.github.com/repos/donmccurdy/wicit/milestones{/number}","notifications_url":"https://api.github.com/repos/donmccurdy/wicit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/donmccurdy/wicit/labels{/name}","releases_url":"https://api.github.com/repos/donmccurdy/wicit/releases{/id}","created_at":"2015-01-25T05:00:14Z","updated_at":"2015-03-25T06:11:46Z","pushed_at":"2015-03-26T06:33:07Z","git_url":"git://github.com/donmccurdy/wicit.git","ssh_url":"git@github.com:donmccurdy/wicit.git","clone_url":"https://github.com/donmccurdy/wicit.git","svn_url":"https://github.com/donmccurdy/wicit","homepage":null,"size":15983,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"code4sac:master","ref":"master","sha":"34d3b543458c5222894720965904931bb73bcd73","user":{"login":"code4sac","id":3915088,"avatar_url":"https://avatars.githubusercontent.com/u/3915088?v=3","gravatar_id":"","url":"https://api.github.com/users/code4sac","html_url":"https://github.com/code4sac","followers_url":"https://api.github.com/users/code4sac/followers","following_url":"https://api.github.com/users/code4sac/following{/other_user}","gists_url":"https://api.github.com/users/code4sac/gists{/gist_id}","starred_url":"https://api.github.com/users/code4sac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code4sac/subscriptions","organizations_url":"https://api.github.com/users/code4sac/orgs","repos_url":"https://api.github.com/users/code4sac/repos","events_url":"https://api.github.com/users/code4sac/events{/privacy}","received_events_url":"https://api.github.com/users/code4sac/received_events","type":"Organization","site_admin":false},"repo":{"id":22449167,"name":"wicit","full_name":"code4sac/wicit","owner":{"login":"code4sac","id":3915088,"avatar_url":"https://avatars.githubusercontent.com/u/3915088?v=3","gravatar_id":"","url":"https://api.github.com/users/code4sac","html_url":"https://github.com/code4sac","followers_url":"https://api.github.com/users/code4sac/followers","following_url":"https://api.github.com/users/code4sac/following{/other_user}","gists_url":"https://api.github.com/users/code4sac/gists{/gist_id}","starred_url":"https://api.github.com/users/code4sac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code4sac/subscriptions","organizations_url":"https://api.github.com/users/code4sac/orgs","repos_url":"https://api.github.com/users/code4sac/repos","events_url":"https://api.github.com/users/code4sac/events{/privacy}","received_events_url":"https://api.github.com/users/code4sac/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code4sac/wicit","description":"A simple node/express app for finding locations that accept WIC in California, using data from the new California Department of Public Health open data portal.","fork":false,"url":"https://api.github.com/repos/code4sac/wicit","forks_url":"https://api.github.com/repos/code4sac/wicit/forks","keys_url":"https://api.github.com/repos/code4sac/wicit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code4sac/wicit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code4sac/wicit/teams","hooks_url":"https://api.github.com/repos/code4sac/wicit/hooks","issue_events_url":"https://api.github.com/repos/code4sac/wicit/issues/events{/number}","events_url":"https://api.github.com/repos/code4sac/wicit/events","assignees_url":"https://api.github.com/repos/code4sac/wicit/assignees{/user}","branches_url":"https://api.github.com/repos/code4sac/wicit/branches{/branch}","tags_url":"https://api.github.com/repos/code4sac/wicit/tags","blobs_url":"https://api.github.com/repos/code4sac/wicit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code4sac/wicit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code4sac/wicit/git/refs{/sha}","trees_url":"https://api.github.com/repos/code4sac/wicit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code4sac/wicit/statuses/{sha}","languages_url":"https://api.github.com/repos/code4sac/wicit/languages","stargazers_url":"https://api.github.com/repos/code4sac/wicit/stargazers","contributors_url":"https://api.github.com/repos/code4sac/wicit/contributors","subscribers_url":"https://api.github.com/repos/code4sac/wicit/subscribers","subscription_url":"https://api.github.com/repos/code4sac/wicit/subscription","commits_url":"https://api.github.com/repos/code4sac/wicit/commits{/sha}","git_commits_url":"https://api.github.com/repos/code4sac/wicit/git/commits{/sha}","comments_url":"https://api.github.com/repos/code4sac/wicit/comments{/number}","issue_comment_url":"https://api.github.com/repos/code4sac/wicit/issues/comments{/number}","contents_url":"https://api.github.com/repos/code4sac/wicit/contents/{+path}","compare_url":"https://api.github.com/repos/code4sac/wicit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code4sac/wicit/merges","archive_url":"https://api.github.com/repos/code4sac/wicit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code4sac/wicit/downloads","issues_url":"https://api.github.com/repos/code4sac/wicit/issues{/number}","pulls_url":"https://api.github.com/repos/code4sac/wicit/pulls{/number}","milestones_url":"https://api.github.com/repos/code4sac/wicit/milestones{/number}","notifications_url":"https://api.github.com/repos/code4sac/wicit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code4sac/wicit/labels{/name}","releases_url":"https://api.github.com/repos/code4sac/wicit/releases{/id}","created_at":"2014-07-30T23:49:10Z","updated_at":"2015-03-24T06:07:07Z","pushed_at":"2015-03-24T06:07:07Z","git_url":"git://github.com/code4sac/wicit.git","ssh_url":"git@github.com:code4sac/wicit.git","clone_url":"https://github.com/code4sac/wicit.git","svn_url":"https://github.com/code4sac/wicit","homepage":"http://findwic.com/","size":16288,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":14,"forks":12,"open_issues":14,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/code4sac/wicit/pulls/35"},"html":{"href":"https://github.com/code4sac/wicit/pull/35"},"issue":{"href":"https://api.github.com/repos/code4sac/wicit/issues/35"},"comments":{"href":"https://api.github.com/repos/code4sac/wicit/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/code4sac/wicit/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/code4sac/wicit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code4sac/wicit/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/code4sac/wicit/statuses/1499759fd008299e189fbc6ec6f257a0059f3708"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":48,"deletions":8,"changed_files":2}}