跳到正文
Skillpedia
网站与界面(前端)75k · #2936

meta-refresh

它能做什么

这项技能找出使用自动 meta refresh 进行跳转或重新加载的页面,并用更好的方案替换它们。适用于希望页面可预测、更易访问的开发者。

适用场景

  • ✓当你请智能体检查页面是否存在自动跳转或刷新的时候。
  • ✓当用户反映页面在没有提示的情况下重新加载或跳转到其他地址的时候。
  • ✓当你迁移仍使用 meta refresh 标签把访客带到其他地方的旧页面的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/meta-refresh/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/meta-refresh/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的一些旧页面使用 meta refresh 标签跳转。请帮我换成正规的重定向。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会在 HTML 中搜索会自动刷新页面的 meta 标签。然后它会建议使用服务器端重定向,或提供一个由用户决定是否点击的清晰链接。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Avoid meta refresh redirects

Unexpected page refreshes or redirects can be extremely confusing for users with cognitive disabilities and can cause screen readers to restart reading from the beginning.

Quick Reference

  • Avoid using <meta http-equiv="refresh"> for page redirects
  • Use server-side redirects (301 or 302) instead of client-side meta refreshes
  • Ensure users have control over page refreshes and redirects

Check

Check the HTML for any meta tags that use http-equiv="refresh" for automatic page redirection.

Fix

Replace meta refresh redirects with server-side redirects or clear, user-initiated links.

Explain

Explain why automatic page refreshes can be a major barrier for accessibility and user experience.

Code Review

Review the rendered markup and interactive states that affect Avoid meta refresh redirects. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/accessibility/meta-refresh

常见问题

为什么自动刷新是个问题?

它可能会让有认知障碍的用户感到困惑,也可能使屏幕阅读器从头开始朗读。

应该使用 301 还是 302 重定向?

这项技能提到使用 301 或 302 状态码的服务器端重定向作为替代方案。

如果应该由用户决定何时跳转呢?

那么这项技能建议使用由用户点击激活的清晰链接,而不是自动跳转。

详情

作者的原始描述

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Avoid meta refresh redirects. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2936
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能