JuniorRay / pjax-plus

更改源码,解决Pjax源码,js失效的bug(Change the source code to solve the bug of Pjax source code and JS failure)
1 stars 0 forks source link

网页html输出了两次 #1

Open zwying0814 opened 4 years ago

zwying0814 commented 4 years ago

作者您好,使用了您的pjax代码后,网页的整个html输出了两次 TIM截图20200224143044.jpg

JuniorRay commented 4 years ago

你好,不好意思,最近项目比较忙回复的比较晚。是这样的,pjax要结合ssr服务端渲染才能达到单页面程序的优势,PJAX会向服务端发送一个请求头,'X-PJAX if (request.headers['X-PJAX']){ 渲染布局1 }else{ 渲染布局2 } 从而解决你说的重复输出的问题