---
title: "Avoid meta refresh and JavaScript · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/redirects-and-canonicals/client-side-redirects
updated: 2026-10-20
licence: "All rights reserved"
---

# Avoid meta refresh and JavaScript redirects

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Avoid
- Chapter: [Redirects and canonicals](https://agentwranglers.se/playbook/website/redirects-and-canonicals)
- Rule: Don't redirect with `<meta http-equiv="refresh">` or JavaScript. Do it on the server.
- How: Client-side redirects are slower, can fail when scripts don't run, and give search engines a weaker signal. Use them only on hosting that cannot redirect at all. Then use an instant meta refresh with a delay of 0, which Google treats as permanent. A delayed one counts as temporary.
- Check: Search the built pages for `http-equiv="refresh"`, `location.href =`, `location.replace(` and `location.assign(`. None appears.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/redirects-and-canonicals/client-side-redirects`.

- Previous: [Use the right redirect code](https://agentwranglers.se/playbook/website/redirects-and-canonicals/redirect-codes)
- Next: [Make every canonical signal agree](https://agentwranglers.se/playbook/website/redirects-and-canonicals/canonical-signals)
- [Redirects and canonicals](https://agentwranglers.se/playbook/website/redirects-and-canonicals)
