Plugin jQuery: Controlling History: the HTML5 History API with jQuery

Controlling History: the HTML5 History API with jQuery
http://www.jqueryrain.com/?http://inserthtml.com/demo/history/
http://www.inserthtml.com/2013/06/history-api/
09/07/2013

Nội dung

Controlling History: the HTML5 History API with jQuery

Today we’re going to look at a way to keep a sense of consistency on your website by maintaining the state of some elements even when the user navigates through history. We’re effectively going to create history-inactive areas which remain in the same state while the rest of the document is navigable.

This technique effectively allows ‘selective’ loading of elements. Effectively, if the user clicks a link or presses the back button, instead of loading the whole page (most of which stays constant, like script and stylesheets), we will only load the stuff that changes, i.e. the content. By doing this we save load times There are two main reasons why you would want to only load certain elements when your user uses the back and forward button to navigate through history. This cuts out all the unnecessaries and creates a faster web experience.

Tags: History

Nguồn: www.jqueryrain.com/2013/07/controlling-history-the-html5-history-api-with-jquery/


Chưa có phản hồi
Bạn vui lòng Đăng nhập để bình luận