Take screenshot of a webpage using pagespeedsonline - screen-capture

I would like to capture the thumbnail of a webpage using google page speed insights.
Is it possible to turn of all the other operations except screen capture to increase the responce time. right now it is taking good amount of time.
https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://developers.google.com&screenshot=true
and also what would be the cost for making the api calls ?

Related

How to replay a webpage using captured http traffic?

If I capture all traffic from a webpage which contains video(e.g. a Youtube Live channel), is there any way to replay the webpage using these traffic?
I try to use Selenium IDE to implement the function of record and replay. However, it can only record users' actions, not webpage elements, let alone the videos in webpage.
Screen recording is an alternative way, but it is not what I want.

Google map and Google Analytics on the same page, google map css, fonts are taking first place in the header

Google Map and Google Analytics on the same page, here I need to display the analytics code as the first one but automatically google map Css taking the first place in the header. how could load the analytics as first one in the header section?
also, google captcha taking the second place, please help me to sort out this problem
FYR I have attached the screenshot :
https://imgur.com/a/ZgXPBiz
You don't need to bother too much about that. Google Analytics is loaded on the pages asynchronously, meaning that you can't determine the location in the HTML code served to the visitor.
Also, GA loading a couple of lines below the opening is more than good enough and doesn't pose a threat or a big difference in the performance of the tracking because of it.

Programmatically trigger the stop button from a Chrome extension

I am trying to implement a hard limit on a how long a web page can load via a Chrome extension. I have seen a number of implementations that suggest using a content script to call window.stop(), but in some cases the browser is never going to execute that JavaScript because it's still attempting to load a page that is going to time out. An example of such a site is http://blackhole.webpagetest.org.
At a very basic level, I need the extension to be able to hit the "Stop" button in the browser after a specified amount of time.
Any suggestions on how to accomplish this in Chrome?

Google Chrome extension: background page or event page?

I'm building a Google Chrome extension at the moment and I have a question about when to use an event page.
A quick look at the Chrome extension docs shows that Google really want its developers to use event pages, if possible.
My extension currently uses a background page, but I was wondering if I should switch to an event page?
This is what my extension does:
When matched with a particular website, it injects a script that adds buttons for the user to access extra functionality.
Most of this extra functionality consists of doing fairly computationally expensive operations on user-entered data - this is all done in the background page (it is all it does).
When a user wants to run these operations on their data they press a button and this passes a message, from the injected script to the background page, which then passes a message back containing the results of its operations.
Essentially, all the background page is doing is waiting for message passing from an injected script in one particular website and then running some operations. Since it doesn't need to be active all the time, this suggests that I should be using an event page.
Can anyone confirm if this would be a good idea for me? Or are there reasons why I should stick to a background page?
Allowing the background page to suspend (chrome.runtime.onSusend) is great, because it will free up system resources. The page will automatically be launched when a matching event happens (chrome.tab.onUpdated etc). I can't think of any compelling reason to use a persistent background page. You can always store any long term state in chrome.storage.local or indexedDb, etc.

Least intrusive webcam capture in browser

I need to capture webcam images from inside browser. I am planning to use Flash but since am not experienced in it, before jumping into it, I want to ask you experts :
Will Flash ask for Webcam permission every time user refreshes the page ? Isn't there some global security setting to allow a website.
Is it essential to display the webcam feed on the browser to be able to capture it / take snapshot and upload to server. I totally don't want to show live feed on the webpage, all I want is to take snapshots and upload it in the background.
The purpose of above requirement is that we are trying to add proctoring to our online assessment platform, and hence we don't want to reload / ask for permission again every time candidate views a new test page. One alternative can be making the whole site a single page webapp, but definitely that will add quite some overhead.