Java applets A Java applet example

https://en.wikipedia.org/wiki/Ajax_(programming)

https://zh.wikipedia.org/wiki/AJAX

Ajax (also AJAX; /ˈæks/; short for asynchronous JavaScript and XML)[1][2][3] is a set of web development techniques using many web technologies on the client-side to create asynchronous Web applications. With Ajax, web applications can send data to and retrieve from a server asynchronously (in the background) without interfering with the display and behavior of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows for web pages, and by extension web applications, to change content dynamically without the need to reload the entire page.[4] In practice, modern implementations commonly substituteJSON for XML due to the advantages of being native to JavaScript.[5]

 

 

上个世纪90年代,几乎所有的网站都由HTML页面实现,服务器处理每一个用户请求都需要重新加载网页。这样的处理方式效率不高。用户的体验是所有页面都会消失,再重新载入,即使只是一部分页面元素改变也要重新载入整个页面,不仅要刷新改变的部分,连没有变化的部分也要刷新。这会加重服务器的负担。

这可以用异步加载来解决。1995年,JAVA语言的第一版发布,随之发布的的Java applets(JAVA小程序)首次实现了异步加载。浏览器通过运行嵌入网页中的Java applets与服务器交换数据,不必刷新网页。1996年,Internet Explorer将iframe元素加入到HTML,支持局部刷新网页。

 

 

 

https://en.wikipedia.org/wiki/Java_applet

 

To minimize download time, applets can be delivered in the form of a jar file. In the case of this example, if all necessary classes are placed in the compressed archive example.jar, the following embedding code could be used instead:

 

<p>
  Here it is:
  <applet archive="example.jar" code="HelloWorld" height="40" width="200">
    This is where HelloWorld.class runs.
  </applet>
</p>

 

posted @ 2016-09-13 12:02  papering  阅读(241)  评论(0编辑  收藏  举报