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

Adding cache buster to index.html #445 #451

Merged
merged 10 commits into from
Dec 28, 2023

Conversation

shech2
Copy link
Contributor

@shech2 shech2 commented Dec 21, 2023

Summary by CodeRabbit

  • New Features

    • Implemented cache busting for improved content freshness.
  • Refactor

    • Updated script references for better cache management.
  • Tests

    • Renamed login tests to subscribe tests to better reflect their purpose.
  • Documentation

    • Added meta tags for cache control in the HTML document.

@shech2 shech2 linked an issue Dec 21, 2023 that may be closed by this pull request
Copy link

coderabbitai bot commented Dec 21, 2023

Walkthrough

The recent updates involve enhancing cache management for a web application. The main JavaScript file's versioning has been updated, and a new script has been introduced to dynamically generate cache busters. Additionally, there's been a renaming of test cases in a WebRTC module to reflect a shift from login to subscribe terminology.

Changes

File Path Change Summary
index.html Updated query parameter v for main.ts, added /cacheBuster.ts script, and included new meta tags for cache control.
cacheBuster.ts Added function to generate cache buster values and update main.ts script src attribute.
aatp/peerbook_webrtc/admin.spec.ts Renamed login tests to subscribe tests without altering the logic.

Poem

🐇✨
In the web's woven warren, a cache update hops,
With a timestamped leap, stale scripts we swap.
From login to subscribe, the tests now dance,
A bunny's code jig, in the moonlight's glance.
🌕💻

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
    • @coderabbitai generate unit tests for this file
    • @coderabbitai modularize this function
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions. Examples:
    • @coderabbitai gather interesting statistics about this repository and render them in a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai generate unit tests for the src/utils.ts file.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

netlify bot commented Dec 21, 2023

Deploy Preview for terminal7 ready!

Name Link
🔨 Latest commit 93532bb
🔍 Latest deploy log https://app.netlify.com/sites/terminal7/deploys/6589b488ab1c410008d62605
😎 Deploy Preview https://deploy-preview-451--terminal7.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 3c7becb and f2d314a.
Files selected for processing (1)
  • index.html (1 hunks)
Files skipped from review due to trivial changes (1)
  • index.html

@shech2 shech2 changed the title Adding cache buster to index.html Adding cache buster to index.html #445 Dec 21, 2023
Copy link

netlify bot commented Dec 21, 2023

Deploy Preview for dazzling-kringle-090742 ready!

Name Link
🔨 Latest commit 93532bb
🔍 Latest deploy log https://app.netlify.com/sites/dazzling-kringle-090742/deploys/6589b48847837e0008a141b0
😎 Deploy Preview https://deploy-preview-451--dazzling-kringle-090742.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between f2d314a and 478c100.
Files selected for processing (1)
  • index.html (1 hunks)
Files skipped from review due to trivial changes (1)
  • index.html

@shech2
Copy link
Contributor Author

shech2 commented Dec 21, 2023

with a timestamp for today's date , need to be changed every month for now , im thinking of a automatic solution instead of this static one.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 4

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 478c100 and 62657aa.
Files selected for processing (2)
  • cacheBuster.ts (1 hunks)
  • index.html (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • index.html

cacheBuster.ts Outdated Show resolved Hide resolved
cacheBuster.ts Outdated Show resolved Hide resolved
cacheBuster.ts Outdated Show resolved Hide resolved
cacheBuster.ts Outdated Show resolved Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 62657aa and badb758.
Files selected for processing (1)
  • cacheBuster.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • cacheBuster.ts

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between badb758 and f56ef88.
Files selected for processing (1)
  • aatp/peerbook_webrtc/admin.spec.ts (4 hunks)
Files skipped from review due to trivial changes (1)
  • aatp/peerbook_webrtc/admin.spec.ts

@shech2 shech2 self-assigned this Dec 23, 2023
@shech2 shech2 requested a review from daonb December 23, 2023 12:35
index.html Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between f56ef88 and c97faa5.
Files ignored due to filter (1)
  • netlify.toml
Files selected for processing (1)
  • index.html (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • index.html

index.html Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between c97faa5 and 67d5c30.
Files selected for processing (1)
  • index.html (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • index.html

@shech2 shech2 requested a review from daonb December 25, 2023 14:51
index.html Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 67d5c30 and 93532bb.
Files selected for processing (1)
  • index.html (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • index.html

@shech2
Copy link
Contributor Author

shech2 commented Dec 26, 2023

i think this PR can be merged , we do not need tests for this i think.
@daonb what do you think ?

@daonb daonb merged commit 1da0dec into master Dec 28, 2023
10 checks passed
@shech2 shech2 deleted the 445-add-a-cache-buster-for-pwa-upgrades branch January 3, 2024 09:45
daonb pushed a commit to daonb/terminal7 that referenced this pull request Jan 25, 2024
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

Successfully merging this pull request may close these issues.

Add a cache buster for PWA upgrades
2 participants