Code Monkey home page Code Monkey logo

crumbs's Introduction

Crumbs

I had the idea that if you use JS cookies and HTML5 localStorage together that it might be possible to create a loop where after permission had been granted to store data a site owner could recreate a cookie from localStorage and vice versa. This is just a proof of concept and might be considered somewhat 'Black Hat'. Think of it like cookie persistence but like really persistent. It was built on a lazy sofa Sunday so probably doesn't work on all browser/platform combos but it definitely works on Mac OS 10.11 and Chrome build 50. YMMV.

Use

If you're thinking of implementing Crumbs on your own site then perhaps you should think carefully at which point you do so. I would certainly only write the initial cookies after the user had clicked to accept. Then this cookie/localStorage Frankenscript wouldn't feel quite so evil. Use your own discretion.

Notes

After I started work on this project I realised that it's so obvious that someone must have already implemented it in the wild. That's when I discovered everCookie. It's not quite the same thing but it's got elements of the same sort of thinking.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.