城市胡同: 技术

来源:百度文库 编辑:神马文学网 时间:2024/04/28 03:48:43

Adding Ajax to a Website

By kevinwu on January 3, 2009 2:11 PM | No Comments | No TrackBacks

Creating a dynamic, user-friendly website interface is simple and straightforward

by Andrew Turner

Introduction

Modern websites and web-applications appear drastically different from sites on the web 5 and 10 years ago. Tools like GoogleMail, BaseCamp, and TiddlyWiki have revolutionized the general concept of what a webpage can do and how users interact with it. The days of clicking on a simple hyperlink to be taken to a new page, or sitting and waiting for a form submission are rapidly dwindling.

The technology driving these sites is not really new, but their application and use has only recently become widespread and supported by a majority of web browsers. Furthermore, many web developers feel daunted by the rapid pace of the changing techniques and don't have a clear understanding of how the technologies are implemented and used.

One of the most revolutionizing of these technologies has been dubbed AJAX (or Ajax depending upon whom you ask). Ajax is responsible for dynamic page content, marking database entries, and in-line text-editing without the need for page-reloads or large, complex plug-ins like Flash or Java.

The goal of this article is to teach you the basics of Ajax and demonstrate that it is not as difficult a concept as it may first appear. In reality, Ajax is simple and easy for any web developer to add to their new or already existing site.

What is Ajax?

AJAX is an acronym for: Asynchronous Javascript and XML. The most important concept of AJAX is the "asynchronous" part. Asynchronous communication means that commands do not need to wait for a response. By contrast, synchronous communication requires the command to wait for a response before continuing. An example of synchronous communication is a typical hyperlink; the user clicks a link, and then waits while the resulting page is requested, returned, and displayed. An asynchronous example may be having a contact name and phone number lookup with dynamic autocomplete with names already in the database. For application developers, it may be useful to think of synchronous communication as modal, while asynchronous is non-modal.

Javascript is the client-side scripting language that has been used to implement the input, output and server-response handling. Because the code is client-side it is fast and scales up with increasing usage. The last part of the AJAX acronym is XML (extensible Markup Language), which is used in the response to encapsulate information. By using a structure like XML, the client can parse the tree for specific data without having a predetermined order of the data. As we will discuss, XML or Javascript are not required to implement "Ajax" in a site.

Ajax uses several other technologies and functionality to work. XHTML and the Document Object Model (DOM) allow Javascript to dynamically modify a webpage. CSS (Cascading Style Sheets) are not necessary, but are typically employed to provide for easy layout and design of a webpage and allow the Ajax functionality to work on the data, and not the view.

The reason the technology is referred to as either AJAX or Ajax is because of the blurring between the concept, and the implementation. Ajax (non-acronym) has become the terminology associated with the ability to dynamically modify a webpage or backend content without requiring a page reload, while AJAX (acronym) is the specific implementation of Ajax employing Javascript and XML. The term Ajax was coined by Jesse Garnett of AdaptivePath (see resources) as a better name than the previously used "Asynchronous JavaScript + CSS + DOM + XMLHttpRequest". The technologies were all originally combined by Microsoft for developing their Outlook Personal Information Manager (PIM) web application interface.

Why use Ajax?

While the web has inarguably drastically changed the way a computer user works, to date they haven't been able to fully replace, or even work entirely in tandem with, desktop applications. To clarify, a desktop application is software that must be installed on a user's computer and is run in a self-contained window/context. By contrast, a web application operates primarily within a user's browser and is not required to be installed on a machine. This provides users access to the application and associated data from any computer using a suitable browser.

However, with the advent and widespread use of technologies such as Ajax, users can now complement, or even replace, their desktop applications with a web application. Many users are now switching to reading their email in GoogleMail, storing their documents and notes in TiddlyWiki, reading their RSS news via Gregarious, or working with colleagues in BaseCamp.

Adding Ajax to your own web site or web application provides a much smoother, and rich user experience. Furthermore, Ajax websites more closely imitate their desktop counterparts, allowing users to interact and understand the user interfaces in a similar way.

Ajax is also a relatively straightforward and simple technology to provide in a website. Developers may quickly become confused by all of the terms, techniques, and options. However, at its core, Ajax is quick to setup and begin using, and completely flexible for whatever the developer and site requirements need. Ajax can be used for features such as inline form validation, database queries, content editing, drag-and-drop, page updating, and many others

Setting up the framework

Parts of Asynchronous Communications

In order to understand the essential parts of an Ajax framework, we will discuss the necessary parts of asynchronous communications. The parts are split up by Client, the user's browser, and Server, the website hosting server.

    Client: Create a request object

    BClient: Assign a response handler

    Client: Send a query to the server

    Server: Receive the query, and perform operations

    Server: Send the response to the client

    Client: Handle the server response


Figure 1: Asynchronous communications allow a user to continually interact with the browser, and provides dynamic updating of the web site

The client requests to the server can happen continually, updating the web page or application on each response received. Each request happens separately from the interface, allowing the user to continue to view and interact with the web page.

However, it is a good idea to only support a single asynchronous command at a time as the response may affect the interface data. If multiple asynchronous requests are supported, you must be careful to handle potential conflicts due to user interaction with outdated data.

Create a request object

The first thing to do is to create a constructor that will build a client-side request object. A request object is responsible for wrapping up the actual request, response handler, and state of the request.

Remember that this Javascript code is being run on the user's desktop browser. Therefore creating the request object is the one place where browser specific code is required. In this case, Microsoft's Internet Explorer uses an ActiveX object as the request object, whereas the other browsers all support an XMLHttpRequest() constructor call. We can interrogate the browser to find out what type it is and create the appropriate object. This function is universal for any Ajax use.

AjaxFramework.js

// request object constructor
function createRequestObject() {
var ro;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}

You should now create a global request object that will be used by the client for all future communication.

AjaxFramework.js

// global request object
var http = createRequestObject();

Assign a response handler and handle the response

Our second step is to assign a response handler. A handler is the function that will be called when the request comes back from the server to the client's computer. This function is responsible for verifying the state of the answer, and parsing the response as appropriate. This function is implemented on a project specific basis. It needs to know what the expected response from the server looks like and how to place that response back into the user's browser document.

AjaxFramework.js

// callback function that handles any state changes of our request to the server
function handleResponse() {
if(http.readyState == 1){
// request loading
document.getElementById("status").innerHTML
= "requesting...";
}
else if(http.readyState == 4) {
// request complete
if(http.status == 200) {
// OK returned
var response = http.responseText;

// Add more advanced parsing here if desired
document.getElementById("responseArea").innerHTML
= response;
}
else
{
document.getElementById("status").innerHTML
= "error: " + http.statusText;
}
}
}

The first thing the handleResponse function does is check the current state of the request object. If the object is loading (1), then the user is alerted to this, or if the request is complete (4) then we handle the response. This example just puts the response text (use responseXML for an XML response from a server) into our document's responseArea.

Send a query to the server

Now that we have setup the request object structure, as well as the state handling function, the next step is to create a function that our webpage will be calling for each outgoing request. This function could either accept information via an input parameter, or retrieve user input by querying the document.

Once the user input is received, we create a GET request to a URL. It is important to note that due to security concerns the request can only be made to a server that is hosting the webpage. The domain name must be exactly the same as the request URL, if there is a preceding www. to the domain name. As usual, however, there are some fairly straightforward work arounds for getting external data for your Ajax requests. Several options will be discussed.

This example demonstrates using a REST input (parameters passed via the URL), but other remote query and command options are also possible. Furthermore, the open command supports passing a username and password to the server for accessing protected services.

AjaxFramework.js

// function for filling out and sending a request - called by the actual webpage
function sendRequest() {
var query = document.getElementById("queryInput").value;
var queryURL = "http://localhost.com/service.php?q=" + query;
http.open('GET', queryURL);
http.onreadystatechange = handleResponse;
http.send(null);
return true;
}

We have now completed the necessary parts of our Javascript code to handle creating, sending, and receiving an asynchronous request through a client's browser.

Server handling of the request

The client makes a request to some service or page that is served on the same domain as the original webpage. This service for this example is expecting a value passed via the URL in the GET parameters. The response can be well formed XML, or simple text that will be parsed by the client's browser as discussed above in the handleResponse() function.

service.php

$query = $_GET['q'];
$response = some_service_handling($query);
echo $response;
?>

This server page just passes the query onto another php function and then echoes the response. Since our Ajax request from the browser has made a GET request, this operates like any normal opening a page in a browser. However, instead of the page showing up in a window, it is handled by the client's handleReponse() function.

Using a remote service

As we mentioned earlier, security does not allow the Ajax, specifically XMLHttpRequest, to call another domain in the GET URL. The way around this is provide a locally served wrapper to the remote service. We can parse and pass on each of the incoming parameters. Also, many hosting services don't allow a URL to be opened via the fopen() command, so this example uses curl to make a request to a server. The subsequent response is read by the local server and then returned to the calling Ajax function.

remote_service.php

$remote_params = "";
foreach($_GET as $key=>$value)
{
$$key = $value;
if($value != '')
$remote_params .= "&".$key."=".$value;
}
$remote_url = "http://remotehost.com/remoteservice.php?";

function get_content($url)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);

ob_start();

curl_exec ($ch);
curl_close ($ch);
$string = ob_get_contents();
ob_end_clean();

return $string;
}

$content = get_content ($remote_url.$remote_params);
echo $content;
?>

This example makes no checks on the incoming request. The query and parameters are passed directly onto the remote service. In a real application, it would be responsible to do some basic parameter checking before passing on the request to someone else's hosting service.

That said, it is still a means by which to provide asynchronous services in your own website. You should also be aware that making these remote calls may have longer response times. While this situation is an excellent reason why an asynchronous interface provides a better user experience, users may be left wondering if their request was just lost. Therefore, you should, when appropriate, let the user know that the request is pending in some way.

Furthermore, it would be possible to setup a timeout timer for each request that would call abort() on the request object if the request took too long.

Supporting non-Javascript functionality

This framework will generally work for any modern, Javascript capable browser. However, not all users are using Javascript capable browsers, and other users may have disabled Javascript. Therefore, it is advised that your site support a non-Javascript version of your interface. At the very least, alert the user that they will not be able to use all of the functionality of your web application or page.

To provide a non-Javascript interface only when necessary, your page should use the

Next we create the query input and "Send" button. Note the use of the ambiguous anchor link, #, in the href tag. We use an href link to allow standard style formatting of the "Send" button to match the rest of the sites hyperlinks. By using the local anchor, but with no actual anchor, the hyperlink won't cause a page refresh since the browser thinks it is just scrolling down the current page. Another option would have been to use a generic div and provide a unique formatting for Ajax link as compared to actual hyperlinks.



Send

 



 

 


When the "Send" link is pressed, the queryInput text input is sent as a query to our name lookup service. The user is free to continue to use the web browser. When the response is sent from the server, the retrieved name and number are placed in the contact_name and contact_number divs.

A more advanced version of this application could add in-line searching of the contact name as the user types, similar to autocomplete.

Summary

Ajax is quickly transforming websites from repositories of data into dynamic and useful web applications. This article demonstrated how easy it is to get started with Ajax and add it to your own site. Some examples you can use it for include form checking while the user is entering information, site/document search, database row updating, or editing web content in place.

For more advanced applications you may want to look at several available and supported Ajax toolsets that provide a ready framework and lots of other functionality. Prototype (see resources) is used in Ruby on Rails for its Javascript Ajax functionality, and Sajax is an Ajax toolset for PHP code.

Resources

Ajax technology

    Adaptive Path: http://www.adaptivepath.com/publications/essays/archives/000385.php

    Mozilla Ajax documentation: http://developer.mozilla.org/en/docs/AJAX

    XMLHttpRequest documentation

    http://documentation: developer.apple.com/internet/webcontent/xmlhttpreq.html

Ajax applications

    TiddlyWiki: http://www.tiddlywiki.com

    Gregarius RSS Reader: http://gregarius.net

    Basecamp: http://www.basecamphq.com

    Geocode lookup (with source): http://highearthorbit.com/projects/geocode/

Ajax toolsets

    Prototype, a Javascript framework for web apps: http://prototype.conio.net/

    Sajax, Ajax for PHP: http://www.modernmethod.com/sajax/

Ajax Framework

The following files are the summation of the framework code developed in the article above. It can serve as a skeleton for building your own Ajax applications. Place these files in your /Library/WebServer/Documents directory on your Mac, and turn on "Personal Web Sharing" in the "Sharing Preference Pane".

AjaxFramework.js

function createRequestObject() {
var ro;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}
var http = createRequestObject();

function handleResponse() {
if(http.readyState == 1){

// request loading
document.getElementById("status").innerHTML
= "requesting...";
}
else if(http.readyState == 4) {

// request complete

if(http.status == 200) {

// OK returned
var response = http.responseText;

document.getElementById("status").innerHTML
= "loaded";
document.getElementById("responseArea").innerHTML
= response;
}
else
{
document.getElementById("status").innerHTML
= "error: " + http.statusText;
}
}

}

function sendRequest() {
var query = document.getElementById("queryInput").value;
var queryURL = "service.php?q=" + query;
http.open('get', queryURL);
http.onreadystatechange = handleResponse;
http.send(null);
return true;
}

AjaxDemo.html









Send

 








service.php
echo $_GET["q"];
?>

Andrew Turner is a Systems Development Engineer with Realtime Technologies, Inc. (www.simcreator.com)
and has built robotic airships, automated his house, designed
spacecraft, and in general looks for any excuse to hack together cool
technology. You can read more about his projects at www.highearthorbit.com.






Grails 1.1 Beta 2 版本发布

By kevinwu on December 30, 2008 6:44 PM | No Comments | No TrackBacks

Grails是一个构建在Java 和Groovy 之上的动态Web应用框架 ,利用Java EE 领域的最好的breed APIs 包括Spring, Hibernate 和 SiteMesh 。允许Java 开发者利用他们使用多年的已有知识和被证实配置复杂的经历, Grails 给Java 和 Groovy 开发者带来了基于约定快速开发的乐趣。

1.1 版本的新特性

更好的GORM 事件 (Better GORM events )
对象的只读访问
默认的排列顺序
批处理
动态 Finders 的改进
单项的One-to-manys 遗留映射
增强枚举类型的支持
全局插件
多插件仓库
自动安装插件方案
属性子集的数据绑定
集合类型的数据绑定
模板和动态脚手架
支持更多关联类型
在JSP 中支持JSP 标签库
Maven 集成

等等,详细的内容请看这里。

新版本下载地址:http://grails.org/Download

(开源中国社区)

几款优秀的开源数据挖掘工具

By kevinwu on December 28, 2008 2:39 AM | No Comments | No TrackBacks

本文只对几种流行的开源数据挖掘平台进行了检视,比如Weka和R等。如果您想找寻更多的开源数据挖掘软件,可以到KDnuggets和Open Directory上查看。为了评测这些软件,我们用了UCI Machine Learning Repository上的心脏病诊断数据集。

R

R (http://www.r-project.org) 是用于统计分析和图形化的计算机语言及分析工具,为了保证性能,其核心计算模块是用C、C++和Fortran编写的。同时为了便于使用,它提供了一种脚本语言,即R语言。R语言和贝尔实验室开发的S语言类似。R支持一系列分析技术,包括统计检验、预测建模、数据可视化等等。在 CRAN(http://cran.r-project.org) 上可以找到众多开源的扩展包。
R软件的首选界面是命令行界面,通过编写脚本来调用分析功能。如果缺乏编程技能,也可使用图形界面,比如使用R Commander(http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/)或Rattle(http://rattle.togaware.com)。

Tanagra

Tanagra (http://eric.univ-lyon2.fr/wricco/tanagra/) 是使用图形界面的数据挖掘软件,采用了类似Windows资源管理器中的树状结构来组织分析组件。Tanagra缺乏高级的可视化能力,但它的强项是统计分析,提供了众多的有参和无参检验方法。同时它的特征选取方法也很多。

Weka

Weka (Waikato Environment for Knowledge Analysis, http://www.cs.waikato.ac.nz/ml/weka/) 可能是名气最大的开源机器学习和数据挖掘软件。高级用户可以通过Java编程和命令行来调用其分析组件。同时,Weka也为普通用户提供了图形化界面,称为Weka KnowledgeFlow Environment和Weka Explorer。和R相比,Weka在统计分析方面较弱,但在机器学习方面要强得多。在Weka论坛 (http://weka.sourceforge.net/wiki/index.php/Related_Projects) 可以找到很多扩展包,比如文本挖掘、可视化、网格计算等等。很多其它开源数据挖掘软件也支持调用Weka的分析功能。

YALE (IDMer:现在已经更名为RapidMiner)

YALE (Yet Another Learning Environment, http://rapid-i.com) 提供了图形化界面,采用了类似Windows资源管理器中的树状结构来组织分析组件,树上每个节点表示不同的运算符(operator)。YALE中提供了大量的运算符,包括数据处理、变换、探索、建模、评估等各个环节。YALE是用Java开发的,基于Weka来构建,也就是说它可以调用Weka中的各种分析组件。

KNIME

KNIME (Konstanz InformationMiner, http://www.knime.org)是基于Eclipse开发环境来精心开发的数据挖掘工具。无需安装,方便使用(IDMer:呵呵,大家喜欢的绿色版)。和YALE一样,KNIME也是用Java开发的,可以扩展使用Weka中的挖掘算法。和YALE不同点的是,KNIME采用的是类似数据流(data flow)的方式来建立分析挖掘流程(IDMer:这个我喜欢,和SAS EM或SPSS Clementine等商用数据挖掘软件的操作方式类似)。挖掘流程由一系列功能节点(node)组成,每个节点有输入/输出端口(port),用于接收数据或模型、导出结果。(IDMer:感觉KNIME比Weka的KnowledgeFlow更好用,连接节点时很方便,直接用鼠标拖拽连接端口即可。而Weka中则需要在节点上按鼠标右键,再选择后续节点,比较麻烦,刚开始使用时找了半天才知道怎么连)
KNIME中每个节点都带有交通信号灯,用于指示该节点的状态(未连接、未配置、缺乏输入数据时为红灯;准备执行为黄灯;执行完毕后为绿灯)。在KNIME中有个特色功能----HiLite,允许用户在节点结果中标记感兴趣的记录,并进一步展开后续探索。

Orange

Orange (http://www.ailab.si/orange)是类似KNIME和Weka KnowledgeFlow的数据挖掘工具,它的图形环境称为Orange画布(OrangeCanvas),用户可以在画布上放置分析控件(widget),然后把控件连接起来即可组成挖掘流程。这里的控件和KNIME中的节点是类似的概念。每个控件执行特定的功能,但与KNIME中的节点不同,KNIME节点的输入输出分为两种类型(模型和数据),而Orange的控件间可以传递多种不同的信号,比如learners, classifiers, evaluation results, distance matrices, dendrograms等等。Orange的控件不象KNIME的节点分得那么细,也就是说要完成同样的分析挖掘任务,在Orange里使用的控件数量可以比KNIME中的节点数少一些。Orange的好处是使用更简单一些,但缺点是控制能力要比KNIME弱。
除了界面友好易于使用的优点,Orange的强项在于提供了大量可视化方法,可以对数据和模型进行多种图形化展示,并能智能搜索合适的可视化形式,支持对数据的交互式探索。
Orange的弱项在于传统统计分析能力不强,不支持统计检验,报表能力也有限。Orange的底层核心也是采用C++编写,同时允许用户使用Python脚本语言来进行扩展开发(参见http://www.scipy.org)。


GGobi

数据可视化是数据挖掘的重要组成部分, GGobi (http://www.ggobi.org)就是用于交互式可视化的开源软件,它使用brushing的方法。GGobi可以用作R软件的插件,或者通过Perl、Python等脚本语言来调用。

结论
----
以上介绍的几款软件都是优秀的开源数据挖掘软件,各有所长,同时也各有缺点。读者可以结合自己的需求来进行选择,或者组合使用多个软件。对于普通用户可以选用界面友好易于使用的软件,对于希望从事算法开发的用户则可以根据软件开发工具不同(Java、R、C++、Python等)来选择相应的软件。以上这几款软件(除了GGobi)基本上都提供了我们期望的大部分功能。

10大最热门的网站开发技术

By kevinwu on December 27, 2008 1:11 AM | No Comments | No TrackBacks 虽然现在美国经济出现危机,但是网站开发领域依然很繁荣,因为不论是现在或者将来,网络必定是人们日常生活中不可缺少的组成部分。NETTUTS上列出 10大最吃香的网站开发技术。作为网站开发工程师,如果你精通这些技术,即便在经济不景气的时候,仍然很容易找到一份好工作。

1. Framework knowledge (架构知识)

架构是大型网站开发的重要部分。开发者已经从Rails, Django等公司提供的网站架构工具中收益,因为架构工具可以帮助完成那些需要一定编程知识的重复性的任务。如果你拥有领先的架构技术(像Rails, Django, CakePHP, Symfony等),你的择业面将非常广阔。

2. Widget Development (窗体小部件开发)

窗体小部件(Widgets)是一个嵌入网页的迷你应用程序,通常也可以下载到Windows或者Mac桌面下运行。它让数据变得便与携带而且更具交互性。比较出名的像Yahoo Widgets和AOL Music Widgets。窗体小部件开发除了需要掌握网络应用程序开发所需的语言知识,还需要精通Javascript和Flash知识。

3. Custom CMS themes (内容管理系统主题定制)

如今越来越多人开始使用CMS(内容管理系统,例如Wordpress和Drupal)来构建他们的网站。可以想象不可能大家都用CMS提供的默认主题,为了让自己的CMS网站在外观设计上独树一帜,就需要一些专门给CMS开发主题的技术人员。

4. CMS Customizations and plugin development (内容管理系统的定制以及插件开发)

同样随着CMS的流行,对CMS的功能定制以及插件开发的需求也越来越大。

5. PSD to XHTML services (PSD转换XHTML的服务)

在建站中,许多公司是先用Photoshop设计好网站的外观原图,然后再转换成XHTML。这需要很强的CSS/HTML知识。

6. Javascript Plugin creation(Javascript的插件开发)

Javascript的Framework非常流行,因为它使Javascript的代码开发变得简单。就比如说现在流行的Javascript Framework - jQuery,如果你在它的基础上开发优秀的插件,那么你的插件也会跟着流行起来。

7. Facebook/MySpace applications (Facebook/MySpace 应用程序开发)

Facebook/MySpace两大社交网站在美国红遍半边天。给他们开发应用程序,不用说一定是相当热门的。

8. iPhoneapplications (iPhone 应用程序开发)

同样给iPhone开发应用程序,也一直都可以被大量下载,因此也是很赚钱的活。

9. E-commerce integration (电子商务一体化)

如今电子商务网站(像Ebay,Amazon)与在线银行服务系统(像Paypal和Google Checkout的)之间的配合越来越紧密,因此电子商务交易平台的开发也是相当有前途的。

10. Flash and Actionscript Knowledge (Flash和Actionscript知识)

越来越多的公司采用Flash来制作自己的网站、展现自己的产品,因为精美的动画总是容易吸引人们的眼球。因此Flash动画技术也必然迅速发展。(新浪博客)

巧用Google特殊搜索 准确寻找可用资源

By kevinwu on December 25, 2008 3:46 PM | No Comments | No TrackBacks

搜索Google大家都用过吧?其实我们站长可以用他的一些特殊搜索功能来查找所需要的资料:

首先打开Google,在关键词输入框中输入""index of/"inurl:lib",选择"搜索简体中文网页"选项,回车搜索,得到了一些网页,不要以为这是一些普通的页面,其实它们是一些图书网站的资源列表,点击打开它来看看,怎么样?是不是所有资源一收眼底了?

使用其他关键字可能得到更多的资源:

在搜索框上输入:""index of /"cnki",按搜索你就可以找到许多图书馆的CNKI、VIP、超星等入口!

在搜索框上输入:""index of /" ppt",按搜索你就可以突破网站入口下载powerpint作品!

在搜索框上输入:""index of /"mp3",按搜索你就可以突破网站入口下载mp3、rm等影视作品!

在搜索框上输入:""index of /"swf ",按搜索你就可以突破网站入口下载flash作品!

在搜索框上输入:""index of /""加上要下载的软件名,按搜索你就可以突破网站入口下载软件!

在搜索框上输入:""index of /"AVI",按搜索你就可以突破网站入口下载AVI视频

到这里,大家也许都明白了,其实就是""index of /""这个关键词在起的作用,使用它可以直接进入网站首页下的所有文件和文件夹中,不必在通过HTTP的网页形式了,从而避免了那些网站的限制,作到了突破限制下载。(八哥网)

30个最好的Firefox插件

By kevinwu on December 23, 2008 9:16 PM | No Comments | No TrackBacks

Dejan Cancarevic是一名优秀的网页设计者和开发人员,他精选了30个他经常使用的Firefox插件,这些插件都能很好的帮助网页设计者和开发人员,简化工作量,或是增加设计应用功能等等。

1. CSSMate - 在线的CSS编辑器扩展插件

2. ViewSourceWith - 让你查看页面资源的Firefox扩展应用

3. PicLens - 变换你的浏览器为一个三维的浏览环境来查看网页图片的Firefox扩展插件

4. FireShot -强大的网页截图/截屏插件

5. SeoQuake - 搜索引擎优化和网站推广插件

6. Font Finder -简单的高亮一个事件并且左键点击弹出菜单可以查看CSS样式

7. Live HTTP Headers - 在浏览网页的同时查看一个页面的HTTP头部信息

8. Modify Headers - 允许你添加、修改或过滤http头部请求信息的Firefox扩展插件

9. CSSViewer -一个简单实用的扩张,可以让你查看当前网页中任何部分的CSS代码

10. EditCSS - 只需要右键点击就可以在浏览器的侧边栏中查看和编辑样式表代码

11. Firebug - 查看,编辑和跟踪 网页上面的CSS, HTML和Javascript的Firefox插件

12. View Formatted Source -为网页上的每一个元素格式化并使用不同的颜色高亮显示

13. Professor X -让你不看源代码就能看到页面头部信息的Firefox插件

14. CSS validator - 一键检查当前网页是否符合W3C CSS 标准的验证器插件

15. Validaty -提供给你一个类似于validator.w3.org的校验器按钮

16. Html Validator - 添加HTML校验器

17. Copy as HTML Link -给选中的文本创建一个当前页面的HTML链接

18. TableTools - 过滤、排序 HTML表格等的Firefox扩展插件

19. CHM Reader - 让Firefox支持HTML编译文件的Firefox扩展插件

20. PageDiff - 帮助网页设计者和开发人员在不同的网页之前查看页面源代码

21. Clipmarks - 让你保存当前页面中的任何元素的Firefox插件

22. SourceEditor - 查看和编辑HTML元素代码的Firefox扩展插件

23. Total Validator -使用官方DTDs提供一个真正的HTML检查器的Firefox扩展插件

24. LinkChecker - 检查任何网页上面的有效链接的Firefox扩展插件

25. Web Developer - 添加一个菜单和工具栏,包含各种网页开发工具的Firefox扩展插件

26. Style Sheet Chooser II - 让你选择网站作者为网站提供的候补风格的Firefox扩展插件

27. View Dependencies -显示网页上面所有被装载的元素信息的Firefox扩展插件

28. Accessibar - 可以轻松地操纵网页显示和文本语音输出的Firefox扩展插件

29. Aardvark - 用来清楚网页的冗余信息和打印网页等功能的Firefox扩展插件

30. JSview - 添加能够查看外部档案源代码的功能