Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webkit2png or similar for site previews #20

Open
olliencc opened this issue Dec 31, 2013 · 6 comments
Open

webkit2png or similar for site previews #20

olliencc opened this issue Dec 31, 2013 · 6 comments

Comments

@olliencc
Copy link
Contributor

So I proto-typed a solution yesterday which used an iframe to provide a preview of all the web sites. This basically sucked and resulted in git reset --hard HEAD^. Why did it suck?

  • x-frame-options
  • sites requesting auth
  • sites doing iframe busting

All led to a very crappy user experience. The proper solution is use something like webkit2png (whilst trying to not get exploited using a crappy old version of webkit)

This needs some thought to balance security / functionality.

@divemonkey
Copy link

Have a look at Selenium Web Driver which will let you use Chrome or Firefox:

http://coreygoldberg.blogspot.co.uk/2011/07/python-taking-browser-screenshots-with.html

@olliencc
Copy link
Contributor Author

olliencc commented Jan 3, 2014

only concern I have with that approach is when it's run on a server it creates a massive dependency

@divemonkey
Copy link

Probably not much more than WebKit2PNG. The only concern would be speed and resources with Selenium. I am not sure what the overhead is for Webkit but Selenium is much higher.

How about outsourcing it completely to something like http://web-capture.net/ which would remove any client and server dependency?

@olliencc
Copy link
Contributor Author

I believe this is a viable solution - http://www.chrisle.me/2013/08/running-headless-selenium-with-chrome/

@neonbunny
Copy link
Contributor

There's a list of 3rd party screenshot services at http://snapcasa.com but all the good ones are commercial. I experimented with spawning phantomjs with a screenshot script for every www sub domain, but although it worked, the number of processes was very resource intensive (and 3 never terminated).
There's a list of more fully featured screenshot tools on phantomjs's related projects page (http://phantomjs.org/related-projects.html). I favour one like https://github.com/gre/screenshot-webservice which manages the resource instensity and could be deployed on another server/load balanced cluster for better security/performance if required.

@olliencc
Copy link
Contributor Author

olliencc commented Feb 5, 2014

yeah I don't see this going to be an easy one.. risk of compromise is just massive as well due to crusty webkit versions under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants