chrome-prerender
chrome-prerender copied to clipboard
beforeSend plugin
Is there any option how to use something like beforeSend(req, res, next)
plugin from NodeJS prerender or is there any plan to add this feature?
I need to modify both request and response because:
- I need to disable cache
- I need to add some meta tags
- I need to modify headers
chrome-prerender
isn't designed as a library, it's an application. beforeSend
isn't really applicable to an application. To support all the things you want, we need to redesign it to make it work as a library.
To disable cache, you can set environment var CACHE_BACKEND=dummy
.
To disable cache, you can set environment var CACHE_BACKEND=dummy.
Thanks, but it doesn't work for me (still getting response 304 instead of 200).
@akarienta chrome-prerender
will try to get the requested url's status code if possible. You got 304 means Chrome got 304 for that url.
https://github.com/bosondata/chrome-prerender/blob/master/prerender/chromerdp.py#L427