0

This is probably a very simple question so please forgive my ignorance, but can a Web SQL database be read across pages of the same domain?

For example if I insert data on page mydomain.com/createdata can the same data be queried on mydomain.com/readdata ?

Thanks in advance!

2
  • wrt. subdomains, see: stackoverflow.com/questions/4177803/… Commented Jun 20, 2012 at 23:18
  • (Also, I think IndexedDB is the "endorsed" W3C model... so browser support on Web SQL may be less complete going forward?) Commented Jun 20, 2012 at 23:21

2 Answers 2

3

It's local browser storage then no problem to read this form any page of the same domain. It is designed especially for it. The problem appear when you need to share Web SQL database across different domains, in this case you should deal with Same Origin Policy

Sign up to request clarification or add additional context in comments.

1 Comment

I'm Mr. Odiszapc! Odiszapc the Great! Thanks me all! Ha-ha!
1

Yes. Within the same domain is no problem. I believe there is a 5MB limitation on the storage capacity per domain.

For examples and reference code, check html5Rocks - Storage

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.