<div> <!-- This will not be touched on PJAX updates --> <%= Time.now %> </div> <div data-pjax-container> <!-- PJAX updates will go here --> <%= content_tag :h3, 'My site' %> <%= link_to 'About me', about_me_path %> <!-- The following link will not be pjax'd --> <%= link_to 'Google', 'http://google.com', 'data-skip-pjax' => true %> </div> </body> 12年10月28⽇日星期⽇日
on PJAX updates --> <%= Time.now %> </div> <div data-pjax-container> <!-- PJAX updates will go here --> <%= content_tag :h3, 'My site' %> <%= link_to 'About me', about_me_path %> <!-- The following link will not be pjax'd --> <%= link_to 'Google', 'http://google.com', 'data-skip-pjax' => true %> </div> </body> 12年10月28⽇日星期⽇日
JS/CSS ◦ 2x fast with little JS/CSS ◦ 3x fast with lots JS/CSS ◦ 對 heavy asset 、light content 有非常強 大的提速效果 https://github.com/steveklabnik/turbolinks_test 12年10月28⽇日星期⽇日
change detection: full reload ◦ data-method, data-remote, data- confirm with Rails still works ◦ full speed for pushState browsers,gracefully fallback for everything else 12年10月28⽇日星期⽇日
HTML pages without a refresh ◦ Don't register event handlers or other bindings in a refresh handler unless you reliably tear them down. ◦ You audit all third-party code that you use to make sure that they do not rely on DOM Ready events, or if they do, that they DOM Ready events areidempotent. 12年10月28⽇日星期⽇日