`
andyhu1007
  • 浏览: 193943 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Rails每周闲碎(五): Http, Html, Browser, etc

阅读更多

1. 浏览器的回退

 

    为了避免数据不一致问题,我想到的只有强制禁用浏览器cache(cache control:no cache, no store)。

 

2. Why and how the url is encoded:

 

    http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

 

    and so why some special characters needed to be encoded in HTML? space -> &nbsp. :)

 

 

3. label

 

      html中的label之所以要ID对应,是因为

 

      The label element does not render as anything special for the user. However, it provides a usability improvement for mouse users, because if the user clicks on the text within the label element, it toggles the control.

 

 

<label for="male">Male</label>
<input type="radio" name="sex" id="male" /> 

 

 

4. textarea

 

    oninput和onpropertychange (IE)事件。


5. http keepAlive

 

    Http connection is NOT dropped, but is instead kept open. When the client sends another request, it uses the same connection. This will continue until either the client or the server decides that the conversation is over, and one of them drops the connection.

 

    在Http1.1中,这是默认的。

 

6. cdata

 

    对XHTML兼容,又对现在不支持XHTML的浏览器兼容的方式。

 

 

<script type="text/javascript">
//<![CDATA[                                            
function compare(a,b)
{
if (a < b)
   {alert("a小于b");}
else if (a>b)
   {alert("a大于b");}
else
   {alert("a等于b");}
}
//]]>                                      
</script>

 

    http://www.cnblogs.com/scugzbc/archive/2008/07/13/1242063.html

1
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics