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

Service Worker HTML Handling #1874

Merged
merged 35 commits into from
Oct 21, 2019
Merged

Service Worker HTML Handling #1874

merged 35 commits into from
Oct 21, 2019

Conversation

revanth0212
Copy link
Contributor

Description

Modified the HTML handling capabilities of the Service Worker to fetch and return the same HTML file irrespective of the page the client is in. This is because HTML for / is the same venia-bottoms.html or athena-tank-dress.html. Also since the same HTML is served for all the routes, offline capabilities are improved compared to develop as demonstrated in the demo gif.

Related Issue

Closes #1781

Verification Steps

  1. Start the server using yarn build && yarn stage:venia.
  2. Open the app once the server is ready.
  3. Navigate between multiple pages like category, product, etc. The server should only get requests for / unline develop in which each page will request its own HTML file.

Screenshots / Screen Captures (if appropriate)

html caching demo-low-res

Checklist

revanth0212 and others added 27 commits September 30, 2019 15:44
@revanth0212 revanth0212 added pkg:venia-concept version: Minor This changeset includes functionality added in a backwards compatible manner. performance Things related to perf labels Oct 9, 2019
Copy link
Contributor

@supernova-at supernova-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super cool!

Just a couple minor change requests.

supernova-at
supernova-at previously approved these changes Oct 16, 2019
@dpatil-magento dpatil-magento merged commit 9a878e3 into develop Oct 21, 2019
@dpatil-magento dpatil-magento deleted the revanth/swCachingHTML branch October 21, 2019 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Things related to perf pkg:pwa-buildpack pkg:venia-concept pkg:venia-ui version: Minor This changeset includes functionality added in a backwards compatible manner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature]: Cache only 1 version of HTML and return that for all routes.
4 participants