文章列表
转载 原帖地址 http://yukaizhao.iteye.com/blog/290538
在对大访问量网站进行性能优化时,其中有一点是尽量减少http连接数,道理很明了,减少了单个PV的http连接数,肯定可以增加单台服务器的用户负载数。
减少Http连接数的具体方法是减少没必要的iframe使用,合并js文件,css文件,和一种常见的方法,合并Css小背景图,合并Css小背
景图这一点已经有很多大网站都在做了,比如淘宝,百度贴吧,他们页面上看似有很多小的背景图片,而实际上这些图片都被合并成了一张大图,然后用Css的
Background-positioin属性控制显示 ...
- 2009-02-13 11:23
- 浏览 1400
- 评论(0)
True Ajax with a Windows Look-and-Feel
Bindows is a Graphical User Interface (GUI) software framework for development of rich AJAX and Web 2.0 enterprise web applications
.
Bindows can generate the exact look
and exact feel
(standard shortcut keys, mnemonics, etc) of a Windows GUI on web pages.
B ...
- 2009-01-08 11:06
- 浏览 867
- 评论(0)
equals()方法在包含继承时,需要注意写问题。equals的约定声明:如果p和q不是null,
p.equals(q)也该和q.equals(p)返回同样的值。下面的代码是种错误的写法
class BaseClass {
private int x;
public BaseClass(int i) {
x = i;
}
public boolean equals(Object rhs) {
if (!(rhs instanceof BaseClass))
return false;
return x == ((BaseClass) rhs ...
- 2009-01-06 18:14
- 浏览 959
- 评论(0)
3.2 节 Action配置
Package配置
使用package可以将逻辑上相关的一组Action,Result,Intercepter等组件分为一组,Package有些想对象,可以继承其他的Package,也可以被其他package继承,甚至可以定义抽象的Package。
Package的可以使用的属性:
属性
是否必须
说明
name
是
Package的表示,为了让其他的package引用
extends
否
从哪个package集成行为
namespace
否
参考Namespace配置说明
@TODO Namespace配置说明
abstra ...
- 2008-12-17 16:49
- 浏览 5398
- 评论(0)
To allow more flexible conversions, you can use parseInt( ) and parseFloat( ). These functions convert and return any number at the beginning of a string, ignoring any trailing non-numbers. parseInt( ) parses only integers, while parseFloat( ) parses both integers and floating-point numbers. If a str ...
- 2008-11-13 17:20
- 浏览 873
- 评论(0)
10.1.2 Character Classes
Individual literal characters can be combined into character classes
by placing them within
square brackets. A character class matches any one
character that is contained within it. Thus, the regular expression
/[abc]/
matches any one of the letters a, b, or c. Negate ...
- 2008-11-13 16:36
- 浏览 1028
- 评论(0)
Enhanced typeof function
o.toString() // May invoke a customized toString( ) method for the object
Instead, we have to refer explicitly to the default toString( ) function as the Object.prototype.toString object and use the apply( ) method of the function to invoke it on the desired object:
Obje ...
- 2008-11-13 10:38
- 浏览 807
- 评论(0)
Enumerating Properties
The for/in loop discussed in Chapter 6 provides a way to loop through, or enumerate, the properties of an object. This can be useful when debugging scripts or when working with objects that may have arbitrary properties whose names you do not know in advance. The following code ...
- 2008-11-12 16:18
- 浏览 810
- 评论(0)
The arguments[] array is useful in a number of ways. The following example shows how you can use it to check that a function is invoked with the correct number of arguments, since JavaScript doesn't do this for you:
function f(x, y, z)
{
// First, check that the right number of arguments w ...
- 2008-11-12 10:30
- 浏览 776
- 评论(0)