> For the complete documentation index, see [llms.txt](https://javascriptuse.gitbook.io/javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascriptuse.gitbook.io/javascript/meta-refresh.md).

# Meta Refresh

Thẻ 'meta refresh' cho phép bạn tự động tải lại trang hiện tại sau một khoảng thời gian đã đặt. Trên thực tế, nó chỉ là [`<meta>`](https://www.quackit.com/html_5/tags/html_meta_tag.cfm)thẻ. Các `refresh`chút đơn giản là giá trị bạn cung cấp cho các `http-equiv`thuộc tính. Dù sao, đây là cách bạn làm mới trang bằng HTML.

### Làm mới trang hiện tại

Mã này làm mới trang hiện tại sau 5 giây:

```
< meta  http-Equiv = "refresh"  nội dung = "5" />
```

### Chuyển hướng đến trang khác

Bạn cũng có thể chuyển hướng người dùng đến một trang khác nếu bạn muốn. Ví dụ này chuyển hướng đến một trang khác ngay lập tức. Bằng cách đặt khoảng thời gian thấp (tức là "0"), trang sẽ làm mới / chuyển hướng gần như ngay khi người dùng đến.

```
```

```
< meta  http-Equiv = "refresh"  content = "0; url = http: //www.natural-en môi.com / " />
```

Lưu ý rằng W3C không khuyến nghị sử dụng phương pháp này để chuyển hướng. Điều này là do, đằng sau hậu trường, không có thông tin nào được cung cấp cho trình duyệt (hoặc công cụ tìm kiếm) về trang gốc hoặc trang đích. Tốt hơn là sử dụng chuyển hướng phía máy chủ (trực tiếp qua máy chủ web) hoặc sử dụng mã phía máy chủ. Đây là một ví dụ về [việc sử dụng ColdFusion để thực hiện chuyển hướng URL](https://www.quackit.com/coldfusion/tutorial/coldfusion_redirect.cfm).

### Làm mới JavaScript

Các [`<meta>`](https://www.quackit.com/html_5/tags/html_meta_tag.cfm)thẻ không phải là cách duy nhất bạn có thể làm một refresh client-side. Bạn cũng có thể [sử dụng JavaScript để làm mới trang](https://www.quackit.com/javascript/javascript_refresh_page.cfm) .


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://javascriptuse.gitbook.io/javascript/meta-refresh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
