Skip to content

fix(nav): append timestamp to navigation URL and update fetch headers to prevent caching#107

Open
dobromirts wants to merge 2 commits into
masterfrom
dtsvetkov/prevent-nav-fetch-caching
Open

fix(nav): append timestamp to navigation URL and update fetch headers to prevent caching#107
dobromirts wants to merge 2 commits into
masterfrom
dtsvetkov/prevent-nav-fetch-caching

Conversation

@dobromirts

Copy link
Copy Markdown
Contributor

Related to changes in global navs - eg jp phone number removal
image

Locally after build targeting staging -
image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to ensure the fetched Infragistics global navigation/footer HTML is not served from stale caches (helping reflect upstream nav changes reliably, e.g., staging/production nav updates).

Changes:

  • Append a cache-busting timestamp query param to the /navigation URL.
  • Update the fetch() request to explicitly disable caching via cache: 'no-store' and request cache-control headers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/nav-helpers.ts
Comment on lines 124 to +125
const igBase = lang === 'jp' ? 'https://jp.infragistics.com' : 'https://www.infragistics.com';
const navUrl = `${igBase}/navigation`;
const navUrl = `${igBase}/navigation?_=${Date.now()}`;
Comment thread src/lib/nav-helpers.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

❌ status: awaiting-test PRs awaiting manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants