---
title: "Comment by Gaurav Yadav on \"Building Offline-Ready Webpage with Service Worker and Cache Storage\" | Hashnode"
description: "What happens if a user tries to make a put request on the same form again and again. Does it create a new put request in indexDB ?"
url: "https://hashnode.com/posts/building-offline-ready-webpage-with-service-worker-and-cache-storage/64f6ff2bbf111cbdf56d40ab/comment/64f9bfffc035cd988c324e66"
---

[Discussion](https://hashnode.com/posts/building-offline-ready-webpage-with-service-worker-and-cache-storage/64f6ff2bbf111cbdf56d40ab)

Comment [Building Offline-Ready Webpage with Service Worker and Cache Storage](https://hashnode.com/posts/building-offline-ready-webpage-with-service-worker-and-cache-storage/64f6ff2bbf111cbdf56d40ab)

[Gaurav Yadav](https://hashnode.com/@techispapa)

[Sep 7, 2023](https://hashnode.com/posts/building-offline-ready-webpage-with-service-worker-and-cache-storage/64f6ff2bbf111cbdf56d40ab/comment/64f9bfffc035cd988c324e66)

What happens if a user tries to make a put request on the same form again and again.

Does it create a new put request in indexDB ?

[Naimur Rahman](https://hashnode.com/@naimurdev)

[Sep 7, 2023](https://hashnode.com/posts/building-offline-ready-webpage-with-service-worker-and-cache-storage/64f6ff2bbf111cbdf56d40ab/comment/64f9bfffc035cd988c324e66#reply-64f9cfb7139d4c9cb6118060)

Basically, service worker can intercept the network request/fetch calls. So you can fetch data from the cache based on user requests. But for PUT or POSt request you have make the fetch call when network available.

[Gaurav Yadav](https://hashnode.com/@techispapa)

[Sep 7, 2023](https://hashnode.com/posts/building-offline-ready-webpage-with-service-worker-and-cache-storage/64f6ff2bbf111cbdf56d40ab/comment/64f9bfffc035cd988c324e66#reply-64f9def4139d4c9cb61181f6)

[Naimur Rahman](https://hashnode.com/@naimurdev) Making api calls automatically, BackgroundSync Plugin does that for you.

[Gaurav Yadav](https://hashnode.com/@techispapa)

[Sep 7, 2023](https://hashnode.com/posts/building-offline-ready-webpage-with-service-worker-and-cache-storage/64f6ff2bbf111cbdf56d40ab/comment/64f9bfffc035cd988c324e66#reply-64f9dfb3c035cd988c325114)

[Naimur Rahman](https://hashnode.com/@naimurdev) Let me ask a question in different way.

if a user tries to make a put request on the same form again and again.

Should we store multiple put request for same form, or should we store a single put request.

[Naimur Rahman](https://hashnode.com/@naimurdev)

[Sep 7, 2023](https://hashnode.com/posts/building-offline-ready-webpage-with-service-worker-and-cache-storage/64f6ff2bbf111cbdf56d40ab/comment/64f9bfffc035cd988c324e66#reply-64f9dfe4139d4c9cb611821c)

Wow! Seems interesting. I will definitely check this plugin. Thanks for mentioning this [Gaurav Yadav](https://hashnode.com/@techispapa)
