Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Going offline in the browser With IndexedDB, AppCache & LocalStorage

Slide 3

Slide 3 text

Asia Europe Africa North America Latin America Australia 0 12.5 25 37.5 50 Internet Usage Rates

Slide 4

Slide 4 text

Asia Europe Africa North America Latin America Australia 0 17.5 35 52.5 70 ~ 28% ~ 64% ~ 16% ~ 80% ~ 43% ~ 68% % of population % of internet penetration

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

I don’t have an internet issue. What’s in it for me?

Slide 7

Slide 7 text

I don’t have an internet issue. What’s in it for me?

Slide 8

Slide 8 text

I don’t have an internet issue. What’s in it for me?

Slide 9

Slide 9 text

Use case

Slide 10

Slide 10 text

“Simply put, it’s a way for web pages to store named key/value pairs locally, within the client web browser.” ! ! - diveintohtml5.info _

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Demo

Slide 13

Slide 13 text

Gotchas • “5 megabytes” is how much storage space each origin gets by default.

Slide 14

Slide 14 text

Gotchas • “2.5 million characters” is how much storage space each origin gets by default.

Slide 15

Slide 15 text

IndexedDB “IndexedDB is an API for client-side storage of significant amounts of structured data and for high performance searches on this data using indexes.” ! - developer.mozilla.org _

Slide 16

Slide 16 text

caniuse.com

Slide 17

Slide 17 text

IndexedDB LocalStorage

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Demo

Slide 20

Slide 20 text

ApplicationCache “Developers can use the Application Cache (AppCache) interface to specify resources that the browser should cache and make available to offline users” ! - developer.mozilla.org _

Slide 21

Slide 21 text

AppCache is not  BrowserCache

Slide 22

Slide 22 text

Demo

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Gotchas • Any changes made to the appcache file will cause the browser to update the entire application cache." • If any of the files mentioned in the CACHE section can't be retrieved, the entire cache will be disregarded." • Regardless of whether you include the address of the current page in the configuration, it will be cached.

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Challenges • How to automate indexedDB?" • How to switch off network in between running automation script?" • Inform exact point of failure" • CI integration" • Which browser to choose for automation testing?

Slide 27

Slide 27 text

Thank You www.nextgentesting.org [email protected]" [email protected]" @kansal_raman" @mananbharara