jamesgpearce / confess Goto Github PK
View Code? Open in Web Editor NEW[ARCHIVED] Uses PhantomJS to headlessly analyze web pages and generate manifests. You may be able to use the puppeteer-har package instead.
[ARCHIVED] Uses PhantomJS to headlessly analyze web pages and generate manifests. You may be able to use the puppeteer-har package instead.
The given total size here was not the same with the amount in the real browser using Network Devtool under the transferred.
Hi,
I'm testing confess with http://netzpolitik.org/ which has an https redirect. I've tried also the phantomjs option on ignore https error, but still the script freeze.
Probably the page is not loaded at all, that's the output:
TypeError: 'undefined' is not an object (evaluating 'smallest.size')
confess.js:121
confess.js:401
Would be nice if 'confess.js' would have support for login.
Many "pages" that need a performance analyze are behind a login (e.g. after login and redirect to a new page)
Thanks in advance.
I get this error when I run following command:
phantomjs confess.js http://www.rafalkuczynski.com
My version of phantomjs is 1.3.0 and I am running MacOS X Lion
brianb@Brian-Air:~/workspace/confess(master)$ phantomjs confess.js http://www.google.com cssproperties
TypeError: undefined is not an object (evaluating 'phantom.args.length')
confess.js:417
:0 in forEach
confess.js:416 in processArgs
confess.js:6 in run
"creating a cache manifest file to make your apps run offline."
Does code or some tool exist to do this?
Thanks!
Is it possible to create a Main function and try to execute confess multiple times with different web pages...
For example execute confess with the next pages:
http://facebook.com
http://google.com
http://yahoo.com
...
Hi James,
I've enjoyed playing with confess so far. I'd like to use it indeed to generate our manifest files. It's worked well to find all js, css files and inline images. But it's failed to find any images defined in CSS files in background-images rules.
I understand most of the confess.js script but i'm not too familiar with document.styleSheets and co, so i'm not sure what you're looking for.
Could you please test if the resources defined in CSS file are really included in CACHE output?
Code below does not seem to generate anything:
foreach (document.styleSheets, function (stylesheet) {
foreach (stylesheet.rules, function(rule) {
if (!rule['style']) { return; }
foreach (properties, function(property) {
...
}, this);
}, this);
}, this);
Thank you / Matt
PS: Charles Proxy (www.charlesproxy.com) is a great tool btw if you want to see what resources are being downloaded.
I'd like to analyze the network traffic if I can persist my cookie generated from a previous run.
So for instance with curl I can
# save a cookie
curl -c mycookie https://someurl
# reuse a cookie
curl -b mycookie https://someotherurl
And in confess.js I'd like to either create one using the same switch or use one
# save a cookie
phantomjs confess.js -c mycookie https://someurl
# reuse a cookie
phantomjs confess.js -b mycookie https://someotherurl
If I can figure it out, I'll try to make a PR
I am new to phantomjs scripting and I understand it is possible to send a POST request using page.open() method. Is it possible to use confess.js or modify it to send a POST request?
Also, currently only the URLs and pagetimings are listed. How do I fetch the response body and write to a file?
Not sure if this would be interesting to anyone else but I patched confess.js to color the waterfall based on X-Cache
header that can be sent by Varnish: http://www.varnish-cache.org/trac/wiki/VCLExampleHitMissHeader
Maybe an interesting idea ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.