UNPKG

10.7 kBMarkdownView Raw
1# Change Log
2All notable changes to this project will be documented in this file.
3This project adheres to [Semantic Versioning](http://semver.org/).
4
5## 5.10.0 - 2021-05-06
6### Added
7- modified the `checkIfPageIsDoneLoading` function to stop checking the page status if we received a redirect.
8
9## 5.9.0 - 2021-04-28
10### Added
11- added `timeoutStatusCode` to `tab.prerender` and to `this.options`. We are returning with this status code if a page won't load in `pageLoadTimeout`.
12
13## 5.8.0 - 2020-07-27
14### Added
15- added `timeSpentConnectingToBrowser`, `timeSpentOpeningTab`, `timeSpentLoadingUrl`, `timeSpentParsingPage`, `timeUntilError` to `req.prerender` to allow for debugging of certain issues with the server spending too much time in different lifecycle sections
16- added a fix to setHeader warning by splitting headers on any line returns
17
18## 5.7.0 - 2020-07-24
19### Changed
20- added ability to configure the chrome remote debugging port for running more than one instance of chrome on the same server
21- added automatic closing of browser alert dialogs
22- moved some code from responseReceived down to loadingFinished to help more accurately know when content is done downloading
23- removed the deletion of some CSP headers that weren't really causing any issues
24
25## 5.6.0 - 2019-03-27
26### Changed
27- added configurable options for pdf printing to let you override all options necessary using `this.options.pdfOptions`
28- fixed timeouts on redirects
29- added ability to override other express options on the `.listen()` function by passing in an object now instead of just the port
30
31## 5.5.1 - 2019-02-06
32### Changed
33- We were relying on `document.doctype` to return the full doctype string but that string changed in Chrome v72. We now parse the full doctype object directly in order to build the proper doctype and this change is backwards compatible with older Chrome versions.
34
35## 5.5.0 - 2019-02-06
36### Added
37- Added `domContentEventFired` so that `checkIfPageIsDoneLoading` will wait at least for `domContentEventFired` before also waiting for all network requests to finish. This should hopefully take care of any edge cases where a page is saved too early when Chrome doesn't send new network requests during the parsing of a large .js file.
38
39## 5.4.5 - 2018-12-04
40### Changed
41- fixed issue with creating browser tabs in a new context (to clear cookies/local storage)
42- `LOG_REQUESTS` shows console logging from the webpage being loaded
43- fixed `this.options.followRedirect` typo to now be `this.options.followRedirects`
44
45## 5.4.4 - 2018-08-07
46### Changed
47- Updated Mocha to 5.2.0, Sinon to 6.1.4 and a few minor package numbers
48- Added package-lock.json
49
50
51## 5.4.3 - 2018-08-07
52### Changed
53- Removed a check for success in the response of `Target.disposeBrowserContext` to fix an issue with Chrome 68 removing that response object.
54
55
56## 5.4.2 - 2018-04-05
57### Changed
58- Removed the `Page.addScriptToEvaluateOnNewDocument({source: 'localStorage.clear()'})` since it seemed to be causing an issue with Chrome in some cases. Going to look for a better fix here since our context should be clearing this already.
59
60
61## 5.4.1 - 2018-04-05
62### Changed
63- For checking if a URL returns a redirect, we were checking to see if the request returning the redirect URL matched which failed in some cases where the encoding of the URL was different in the request. That code now checks the request ID to see if it matches the original request.
64- Service worker enable/disable can be enabled/disabled on a per tab basis by setting `req.prerender.enableServiceWorker` in the `requestReceived` event.
65
66
67## 5.4.0 - 2018-04-04
68### Changed
69- Added ability to turn on/off services workers.
70
71
72## 5.3.1 - 2018-03-09
73### Added
74- Added `this.isBrowserConnected = false` inside `server.restartBrowser()` so the prerender server won't try to render any new requests before the browser is actually restarted. Fixes a very small edge case at scale.
75
76
77## 5.3.0 - 2018-03-09
78### Added
79- Added `localStorage.clear()` on a new page being loaded due to bug in BrowserContext local storage being cleared: https://bugs.chromium.org/p/chromium/issues/detail?id=754576
80
81### Changed
82- Changed `document.getElementsByTagName('html')[0].outerHTML` to `document.firstElementChild.outerHTML` when querying page `html` to improve performance.
83
84## 5.2.2 - 2018-02-02
85### Changed
86- Make sure we only call `Buffer.byteLength` on a string to fix an error in newer versions of Node
87
88## 5.2.1 - 2018-01-29
89### Changed
90- Changed `request.loaderId` to `request.requestId` in `requestWillBeSent` due to issue with Chrome 64 changing loaderId format.
91
92## 5.2.0 - 2017-12-08
93### Added
94- Added ability for the prerender server to restart Chrome due to some connection issues we've been seeing after a server is running for a few hours.
95
96## 5.1.1 - 2017-12-08
97### Changed
98- Chrome re-uses the original request ID on a redirect so we are saving off the fact that we saw a redirect to make sure we return a correct 301
99- Changed dependencies from ^ to ~ to make the semver more specific
100
101## 5.1.0 - 2017-12-06
102### Added
103- Added removal of `<link rel="import" src="">` tags after the page is done loading to the `removeScriptTags` plugin. Imported HTML can have script tags in it, and since it's already been rendered to the page we can safely remove it when running that plugin.
104
105## 5.0.3 - 2017-11-29
106### Added
107- Added `if (window.customElements) customElements.forcePolyfill = true`, `ShadyDOM = {force: true}`, and `ShadyCSS = {shimcssproperties: true}` to fix Polymer app rendering.
108
109## 5.0.2 - 2017-11-20
110### Changed
111- Added back `res.setHeader` for plugins to use
112
113## 5.0.1 - 2017-11-15
114### Changed
115- Set `renderType` to `html` for non "/render" endpoint
116
117## 5.0.0 - 2017-11-15
118### Added
119- Added Headless Chrome as a rendering engine!
120- Added new event types: `requestReceived`, `tabCreated`, `pageLoaded`.
121- Added new Prerender server option: `chromeLocation`
122- Added ability to request jpg and png screenshots
123- Added ability to request pdf export of a page
124- Added ability to request HAR file of page load times
125
126### Changed
127- Removed PhantomJS and all references to it
128- Removed old event types: `beforePhantomRequest`, `onPhantomPageCreate`, `afterPhantomRequest`, `beforeSend`
129- Removed In Memory Cache (moved to new repo)
130- Removed S3 HTML Cache (moved to new repo)
131- Removed Prerender server options that are no longer needed: `workers`, `iterations`, `softIterations`, `cookiesEnabled`, `pageDoneCheckTimeout`, `resourceDownloadTimeout`, `jsTimeout`, `noJsExecutionTimeout`, `evaluateJavascriptCheckTimeout`
132
133See the Readme.me for in depth descriptions of all of the new changes!
134
135## 4.4.1 - 2016-12-28
136### Changed
137- Whoops. Make sure `shouldEncodeURLBeforeBrowserFetch` defaults to true.
138
139## 4.4.0 - 2016-12-28
140### Added
141- Added `shouldEncodeURLBeforeBrowserFetch` to allow projects that use prerender to determine whether they want to call `encodeURI` on the URL before fetching it in PhantomJS. Useful for some URLs that might have encoded slashes in them, since encoding them further would cause incorrect behavior.
142
143## 4.3.1 - 2016-08-25
144### Changed
145- Fixed issue where PhantomJS crashed and then disposing caused bad phantomjs state
146
147## 4.3.0 - 2016-08-04
148### Changed
149- Bumped all dependency versions to latest
150
151## 4.2.0 - 2016-08-04
152### Added
153- Added ability for cluster master to kill last known phantomjs pid for a worker if the worker dies (preventing orphaned phantomjs instances)
154### Changed
155- Better terminating for cluster workers
156
157## 4.1.0 - 2016-07-27
158### Added
159- Added NUM_SOFT_ITERATIONS to try to kill phantomjs and reclaim memory when no requests are in flight. This should be set to a low number (1-10) so that PhantomJS can be restarted often when it isn't doing anything else. NUM_ITERATIONS should still be set to something like 40-50 to make sure to force kill PhantomJS even if a request is in flight.
160- Added clearing of memory cache to prevent PhantomJS from returning a 304
161### Changed
162- Fixed issue where prerender-status-code set to `200` was causing the page to skip being cached
163- Fixed an issue where we weren't using the correct pid when trying to force kill PhantomJS.
164- Moved clearing of memory cache and local storage to before the page loads instead of after. This will prevent edge cases that could cause a 304.
165
166## 4.0.10 - 2016-06-01
167### Changed
168- Fixed issue where S3HtmlCache was calling next() before finishing saving to the cache
169
170## 4.0.9 - 2016-05-08
171### Changed
172- Fixed issue where we were calling `hasOwnProperty` on a `querystring` that no longer had Object on it's prototype chain
173
174## 4.0.8 - 2016-03-24
175### Changed
176- Fixed issue where a webpage calling window.close would cause Prerender to be unable to shutdown PhantomJS properly
177
178## 4.0.7 - 2016-03-22
179### Changed
180- S3 cache plugin was incorrectly saving non-200 status code responses to the cache
181
182## 4.0.6 - 2016-03-09
183### Changed
184- preserve phantom arguments when server is restarting
185- use default when phantomArguments is empty
186
187## 4.0.5 - 2016-02-29
188### Changed
189- prevent multiple phantomjs instances from being started with low number of iterations
190- try to check to see if phantomjs has actually been disposed. if not, force kill it.
191
192## 4.0.4 - 2016-02-18
193### Changed
194- added engines to package.json and fixed possible bug in checking options passed in
195- prevent weird hangup on error setting a header with a newline
196- make sure we catch any errors thrown from phridge and continue
197- kill workers (and phantomjs) on SIGTERM
198
199## 4.0.3 - 2016-02-12
200### Added plugin to send a header of X-Prerender: 1 with every request
201
202## 4.0.2 - 2016-02-12
203#### Now using PhantomJS version 2.1
204### Changed
205- Changed `PHANTOM_CLUSTER_NUM_WORKERS` to `PRERENDER_NUM_WORKERS` in server.js
206- Changed `PHANTOM_WORKER_ITERATIONS` to `PRERENDER_NUM_ITERATIONS` in server.js
207- Switched from `phantomjs-node` bridge to `phridge`
208 - All Prerender plugins that access PhantomJS need to be rewritten to support new [phridge](https://github.com/peerigon/phridge) integration.
209 For example, change this:
210 ```
211 req.prerender.page.set('onConsoleMessage', function(msg) {
212 console.log(msg);
213 });
214 ```
215 to this:
216 ```
217 req.prerender.page.run(function() {
218
219 this.onConsoleMessage = function(msg) {
220 console.log(msg);
221 };
222 });
223 ```
224 Please see [phridge](https://github.com/peerigon/phridge) for more info on how to interact with PhantomJS through `phridge`.
225
226 ###Removed
227 - Removed `PHANTOM_CLUSTER_BASE_PORT` since `phridge` doesn't start a webserve to talk to PhantomJS, so it's no longer needed.
228 - Removed `PHANTOM_CLUSTER_MESSAGE_TIMEOUT` since `phridge` doesn't start a webserve to talk to PhantomJS, so it's no longer needed.
229
\No newline at end of file