一, Server Code
JSP---->
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
Java---->
1 <% 2 response.setHeader("Cache-Control","no-store"); 3 response.setContentType("text/html;charset=UTF-8"); 4 response.setHeader("Pragma","no-cache"); 5 response.setDateHeader ("Expires", 0); 6 %>
二,HTML meta标签
1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2 3 <meta charset="utf-8" />
三, JS设置requrest Header
1 xmlhttp.setRequestHeader("Accept", "*");
时间: 2024-10-13 18:40:49