Git Product home page Git Product logo

crossdomainstoragedemo's Introduction

CrossDomainStorageDemo

A reactjs website demo/tutorial on how to access local storage across different domains

Suppose you have two domains e.g. domain1.com and domain2.com and you want the local storage data to be shareable between those two sites then following this tutorial you will be able to achieve that behavior.

Step by Step Guide: Video Tutorial

You can go through the step by step guide to implement this demo. After this tutorial you will be able to access the local storage across two different domains so you can get, set and delete the local storage values across the domains.

Installation Steps

  1. Clone the GitHub repo
  2. Then run following command to install the dependecies
npm install
  1. To run website1, execute following commands, it will run the website on port may be 3000
npm start
  1. To run website2, execute following commands in a separate terminal, it will run the website on next available port may be 3001
npm start
  1. The code handles port 3000 and 3001 by default, if you get different port numbers then please replace the port numbers used in codebase with your website port numbers
You are good to go now!

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.