javascript asp教程の第7課--reponse属性

4297 ワード

Below is a table of Resonse Properties along with examples and explantions.
Resonse Propties
Buffer
Resonse.Buffer=true Allows for the buffering of out put
CacheControl
Reponse.C.acheControl=「Public」Sets Cache to「Public」or「Private」
CharSet
Resonse.China Set=「windows-152」Sets the ISO character set
ContentType
Respecifes the output mime type(text/playe、GIF、JPG)
エクスプレス
Resonse.Expires=60 Sets page expiration in minutes
Expires Absolute
Resuponse.Expires Absoute=菗Januar 31,2003年13:00攂Sets time certain for page to expire
IsClient Conneced
if(Resonse.Is Cient Connected==true){}Determines if client is still connected
PICS
(((See Explannation)Platform for Internet Contect Selection
Status
Resonse.Sttus=“401 Uauthorized”Sets Page Sttus
You are not required to set,alter,or utilize a single Resonse Property if You don't want to.Having said that,they can be handy onece in while.I've demont strand albut wo Propties in the script below.
By the way、set your properties BEFOREE you begin out put to the client.
Get Startd:
Below is the ASP script for Lesson 07.




")
	}
else
	{
	Response.End()
	}
%>
「+x+」\r")
if(x%10==0)
{
レスponse.Clear()
)
if(x%4==0)
{
Resonse.Write("
\r')
Resonse.Write(")
Resonse.Write(\\r)
Resonse.Fush()
)
)
%
Click Here to run the script in a new window.After you click onto the link,really study the numbers.See if you notice anything weird about the page,like missing numbers.
Resonse.Buffer:
Reponse.Buffer allows s s to control the output via Reponse.Fush()and Reponse.Cf Youvenhaven'already,cliconthethe the to to to to to to thethethe the conconconconconstinininine.FFush()and ReReponse.Flalalearararararr.If.If you haveveven haven haven haven haven haven'alalalalalalready,clclclicon thethe thethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethe proproanks to Response.Clear()You might notice that Resonse.Fush()slows down the server TREMENDOUSLY.Don't use this method without a reason.
Resonse.C.acheControl:
Cacheco Control gives you the power to authorize proxy servers to keep your page in cache.(That would be the"Public"setting.)Likewise,it allows you to disallow proxy servers from caching Joure the page."
Resonse.China Set:
CharSet allows you to specify the character set,for example:ISO 8859-1.
Resonse.ContintentType:
ContentType allows you to indicate the mime type of the output.For example there is text/plin and text/html.The is also GIF and JPEG.
Resonse.Expires:
Expires allows you set an expiration time for the page.By setting the Expires property to-1,you are saying the page expired one minute before it was delivered.The browser will(hopefully)not store the cachee the
Resonse.Sttus:
If tomorrow Congress were to pass a law forbidding the use of Resonse.Stuts,I think life would gon.If it makes you happy,use it.
Resonse.Is Cient Conneced:
Is Client Conneced does exactly what it says.It returns a Boolean value that you can use in'if'statement.
Resonse.PICS:
PICS stands for Platform for Internet Contint Selection.It allows pages to be rated for the presence of violence,sexuality.The e e are services on the internet to rate your site.I'never.inver.infone.stred.com.
Response.PICS("(PICS-1.1 labels on")19997.05 T 08:15-500\"until\"199.12.31 T 23:59-000\"ratigs(v 0 s 0 l 0 n 0)")
It's a long string and your browser may have wrapped the text down to a second line.If that's the case,then you have to pretend that the entire PICS string is on one line.
Resonse.Expires Absolute:
I did not demontststort Expiress Absoliute in the script because I already used Reponse.Expiree.Expires.Expires.Expires.Expires.Expires.Expists.Expires.Expistininine.Expititime.Expiststine.Expires.Expistinininininininininininininininine.Expiststststststststststs.eeeeeeininininininininininininininininininininininininininininininininininininininininininininininininthe beginning and and of the date.