这在我运行时有效。一、文件testform.cfm
<cfsetting showdebugoutput="no">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<CFHEADER NAME="Cache-Control" VALUE="no-cache, no-store, must-revalidate">
<!--- this is meant for legacy HTTP 1.0 servers
- only prevents caching when used with secure communications (https://) --->
<CFHEADER NAME="Pragma" VALUE="no-cache">
<!--- this doesn't prevent caching,
just means for future requests that browser must contact server for fresh copy.
cached copy used for BACK and FORWARD buttons--->
<CFHEADER NAME="Expires" VALUE="-1">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="formtarget.cfm" method="post">
<input type="text" name="x" value="" />
<input name="submitbutton" type="submit" />
</form>
</body>
</html>
这是 formtarget.cfm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<cfdump var="#form#">
</body>
</html>
我们在自定义标签中有这三个 cfheader 标签。