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

geeksquiz.com matching #2

Open
PritishC opened this issue Nov 30, 2014 · 2 comments
Open

geeksquiz.com matching #2

PritishC opened this issue Nov 30, 2014 · 2 comments

Comments

@PritishC
Copy link

Hey, your latest master branch code doesn't include the changes from PR #1.

It would be nice if you could re-introduce those changes please.

Edit: After a bit of debugging, I see why you had to remove the feature. localStorage is different for different domains. Surely there must be a way to overcome this problem. It seems that most solutions which try to grow the concept of localStorage into cross-domain functionality depend on server-side changes.

Can't we store the data elsewhere?

@dhruvagarwal
Copy link
Owner

According to the same origin policy .. we can't access localStorage or cookies of any other domain.
some solutions that come to my mind is going cloud but that'll take too much of an effort... what do you say ?

@PritishC
Copy link
Author

Cloud will indeed take too much effort.

  1. From where will we get a cloud server for ourselves?
  2. If the users of this extension grow exponentially, we will have a lot of data to store and will be limited by the cloud server. However, I don't think this would be too much of a problem - after all, it's barely kilobytes of data per user. It depends on how often G4G adds more and more articles.

Imo the client-side storage solution is perfect - the users store the data for themselves - it's just the different domains that are hampering us. Can we not access localStorage of the two domains separately and combine it into a single key or something similar?

The problem with using an invisible iframe to make localStorage cross-domain (as all solutions so far have suggested) is that the changes must be made server-side. And globalStorage is now defunct.

Also, I found PouchDB but I'm not sure if it would work.

I think we ought to request the moderators of geeksforgeeks to add the iframe bit to their servers. We ought to reason with them that the extension will benefit users a lot. Other than this, we could look at solutions which don't involve a front-end (like the widget you've made). I'm out of ideas.

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

No branches or pull requests

2 participants