Skip to content

Commit

Permalink
update!
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyLouvre committed May 17, 2013
1 parent 1e7f240 commit b8a4995
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
Binary file added bigpipe/b1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bigpipe/b2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bigpipe/b3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bigpipe/b4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions bigpipe/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h1>局刷的页面怎么搞seo</h1>
<pre>
这是需要架构支持的,有办法让你的一个页面通过一个参数控制输出形式,可以有三种来解决不同使用场景:
1 pipe_line:先输出html骨架,然后内容部分以js的形式输出在页面底部,利用js渲染出整个页面
2 quickling:把一个页面中的一块或几块组件以json的方式输出,以给其他页面做局刷
3 no_script:让这个页面不依赖js,输出一个普通的html页面
</pre>
<div><img src="b1.jpg"></div>
<div><img src="b2.jpg"></div>
<div><img src="b3.jpg"></div>

<p>同一个网站,同一份代码,是有办法通过巧妙的设计,让它按照你需要的方式输出的</p>
<p>我上面3个截图,就是一个网站的三种输出模式</p>
<p>而第一个,NO_SCRIPT,就可以给spider看</p>
<p>以看看这个<a href="http://v.youku.com/v_show/id_XMjI5MDc1NjA0.html ">http://v.youku.com/v_show/id_XMjI5MDc1NjA0.html </a></p>

<p>第一个图,就是把网站输出为普通的html</p>
<p>第二个图,让网站输出一个html骨架,然后再在后面输出一堆js函数,用js函数去分层填充html内容,并记录这个页面的资源</p>
<p>第三个图,让网站把一个页面的局部输出出来,并找出这个局部所需要的静态资源,这样可以让另一个页面局刷了</p>
<p>就是一种后端的框架,产品线有能力的可以自己弄,思路就是facebook在2010运维大会上提出来的思路:BigPipe+Quickling+PageCache</p>
<p>首先,第二个图的内容就是第一个图的另外一种输出形式,你也看到了,它依赖一个前端的js,这个js就负责渲染页面,所以,可以在工程师不知道的情况下,在后端框架里把这个js插入到这种输出模式下的页面,它可以如实的还原页面效果</p>
<div><img src="b4.jpg"></div>
<p>靠一套后端的代码实现的,运行时生成的。就是当我要输出一个组件的时候,不输出组件,而是输出一个占位div而已</p>
<p>相对应的还有quickling,是高级局刷方案</p>
<p>pagecache是高级局刷之后的缓存方案</p>

</body>
</html>

0 comments on commit b8a4995

Please sign in to comment.