File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -94,18 +94,20 @@ page.onResourceRequested = function (request) {
94
94
requestCount++;
95
95
}
96
96
};
97
- page.open(system.args[ 1] , function () {
98
97
99
- });
98
+ // Open the page
99
+ page.open(system.args[ 1] , function () {});
100
100
101
101
var checkComplete = function () {
102
-
102
+ // We don't allow it to take longer than 5 seconds but
103
+ // don't return until all requests are finished
103
104
if((new Date().getTime() - lastReceived > 300 && requestCount === responseCount) || new Date().getTime() - startTime > 5000) {
104
105
clearInterval(checkCompleteInterval);
105
106
console.log(page.content);
106
107
phantom.exit();
107
108
}
108
109
}
110
+ // Let us check to see if the page is finished rendering
109
111
var checkCompleteInterval = setInterval(checkComplete, 1);
110
112
{% endhighlight %}
111
113
@@ -121,10 +123,10 @@ RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$
121
123
RewriteRule (.* ) http://webserver:3000/%1 ? [ P]
122
124
{% endhighlight %}
123
125
124
- We could also include other RewriteCond, such as user agent to redirect other search engines we wish to be indexed on.
126
+ We could also include other ` RewriteCond ` , such as ` user agent ` to redirect other search engines we wish to be indexed on.
125
127
126
128
127
- Though Google won't use query string unless we tell it to by either including a meta tag;
129
+ Though Google won't use ` _escaped_fragment_ ` unless we tell it to by either including a meta tag;
128
130
` <meta name="fragment" content="!"> `
129
131
or
130
132
using ` #! ` url's in our links.
You can’t perform that action at this time.
0 commit comments