Don’t Use Chrome Command-Line Switch `enable-gpu-memory-buffer-compositor-resources` It Will Break Your HTML5 Videos!

For Chrome/Chromium.

When you “talk to the video-renderer”, to specify that all compositor resources should be backed by GPU memory buffers,
You use the “feature flag” --enable-gpu-memory-buffer-compositor-resources,
while good for various developing aspects, it will show you green video screen instead of the video (on YouTube).

Please do not use it for now.

Make Chrome Faster

1. Use Chrome/Chromium Of x64bit, if your machine can handle it.

2. Install those both official Chrome-extensions:

3. Access chrome://flags/ and change the following values,
you may easily reach either of those by copy&&paste them into the address-bar.

👉 chrome://flags/#num-raster-threads ➧4
👉 chrome://flags/#default-tile-width ➧1024
👉 chrome://flags/#default-tile-height ➧1024

👉 chrome://flags/#enable-fast-unload ➧Enable
👉 chrome://flags/#smooth-scrolling ➧Disable
👉 chrome://flags/#enable-quic ➧Enable
👉 chrome://flags/#enable-zero-copy ➧Enable
👉 chrome://flags/#enable-site-per-process ➧Enable
👉 chrome://flags/#v8-cache-options ➧’Cache V8 parser data.’
👉 chrome://flags/#v8-cache-strategies-for-cache-storage
👉 chrome://flags/#enable-scroll-anchoring ➧Disable
👉 chrome://flags/#enable-pointer-events ➧Enable
👉 chrome://flags/#passive-listener-default ➧’Force All True’
👉 chrome://flags/#document-passive-event-listeners ➧Enable
👉 chrome://flags/#passive-event-listeners-due-to-fling ➧Enable
👉 chrome://flags/#expensive-background-timer-throttling ➧Enable
👉 chrome://flags/#enable-nostate-prefetch ➧’Enabled Prerender’
👉 chrome://flags/#enable-resource-prefetch ➧’Enable Prefetching’
👉 chrome://flags/#delay-navigation ➧Disable

4. Just before the restart required in stage [3] (above),
close all other tabs (other than chrome://flags/),
access chrome://net-internals/#dns in a new-tab, and click the ‘clear host cache’, you can safely close the chrome://net-internals/#dns now, and back in the chrome://flags/ click on the big-blue ‘relaunch now’ button.

5. Run Chrome with the following command-line switches:

--enable-accelerated-vpx-decode="0x03" --prefetch-search-results --disable-pinch --disable-in-process-stack-traces --enable-tcp-fastopen --enable-threaded-compositing --enable-gpu-scheduler --use-double-buffering --enable-hardware-overlays --enable-partial-raster --disable-speech-api --ipc-connection-timeout="90"  --enable-gpu-memory-buffer-compositor-resources --enable-gpu-memory-buffer-video-frames --enable-native-gpu-memory-buffers --disable-payment-request --disable-3d-apis --disable-logging --disable-presentation-api --enable-rgba-4444-textures --v8-cache-options="data" --v8-cache-strategies-for-cache-storage="aggressive"

you may use a .bat or .cmd batch file if it is easier for you,
or use my project.
here is my ini file (for chromium :])


Arguments=--force-device-scale-factor="1.2" --enable-accelerated-vpx-decode="0x03" --allow-outdated-plugins --ppapi-flash-path="C:\Windows\System32\Macromed\Flash\PEPFLA~1.DLL" --ppapi-flash-version="" --prefetch-search-results --enable-lcd-text --enable-font-antialiasing=1 --ppapi-antialiased-text-enabled=1 --no-referrers --reduced-referrer-granularity --force-ui-direction=ltr --enable-pepper-testing --keep-alive-for-test --disable-pinch --ipc-connection-timeout="90" --disable-hang-monitor --disable-in-process-stack-traces --enable-tcp-fastopen --enable-threaded-compositing --enable-grouped-history --ash-md=enabled --material-design-ink-drop-animation-speed="fast" --show-md-login --top-chrome-md="material" --secondary-ui-md="material" --enable-gpu-scheduler --show-md-login --disable-md-oobe --use-double-buffering --desktop-window-1080p --enable-hardware-overlays --enable-partial-raster --disable-speech-api --enable-gpu-memory-buffer-compositor-resources --enable-gpu-memory-buffer-video-frames --enable-native-gpu-memory-buffers --disable-payment-request --disable-3d-apis --disable-logging --disable-presentation-api --enable-rgba-4444-textures --v8-cache-options="data" --v8-cache-strategies-for-cache-storage="aggressive" --enable-threaded-compositing --no-referrers

;;// Overrides the timeout, in seconds, that a child process waits for a
;;// connection from the browser before killing itself.
;;const char kIPCConnectionTimeout[]          = "ipc-connection-timeout";



search this blog for newer ways to download all recent command-line switches and this might also help: :]


JavaScript Snippet – Get Chrome’s Version Using JavaScript

(function(match){                         /* just as string. ie. "57.0.2947.0"*/
  match = null === match ? "" : match[1];
  return match;
  (self.navigator.appVersion + self.navigator.userAgent).match(/Chrome\/([\d\.]+)\ /i)

A trick: Since the version exist both in navigator.appVersion and navigator.userAgent, combining them to one string, and applying a little regular-expression match, using regex-backtrack, has a better chance of “finding something” :]

This one also breaks the Semantic Versioning and convert each value to a number, which may come-in handy for any type of numeric-comparison.

(function(match){                         /* as array of numbers (by the order of reading, left to right). ie. [57, 0, 2947, 0]*/
  match = null === match ? "" : match[1];
  match = match.split(".").reduce(function(carry_result, item){ return [].concat(carry_result,Number(item)); }, []);
  return match;
  (self.navigator.appVersion + self.navigator.userAgent).match(/Chrome\/([\d\.]+)\ /i)

Chromium Code-Search

raw content:

for example, here are all the “switches” files, in raw mode, which may help you include them in a script using cURL or wGet:

also may be useful:

this windows-batch script will download and append each of the files, to a single “” file, then it will open it with Notepad++.
(Just put all the files in “switches_urls.txt” file, place wGet.exe somewhere and modify the path to Notepad++.exe)

@echo off
if exist   del /f /q   >nul

call d:\DOS\wGet\wget.exe         ^
--input-file="switches_urls.txt"  ^
--user-agent="Mozilla/5"          ^
--no-check-certificate            ^
--secure-protocol="auto"          ^
--auth-no-challenge               ^
--no-directories                  ^
--directory-prefix=.              ^

::open for viewing (optional)
call "D:\Software\Notepad++\Notepad++.exe"

Chromium API Keys

When you build Chromium yourself, or download a Chromium nightly-build, you need to provide API-key, a secret-phrase and a client-id,
running Chromium without either of those three phrases will seriously compromise Chromium’s functionality.

The is a sort of “inner-Google” page on how to generate, and use the API-Keys needed to make Chromium a properly, fully functional Chrome-compatible browser (including Syncing your bookmarks and other stuff..)

There is an issue, however, with that page ( which has not been-updated for a while, especially on the names of the API-services, one, needs to enable in-order to use Chromium in a fully functional mode,


I’ve gathered those services (including a direct link for you to use in-order to activate it)
the following list (Google API-console) is ordered as:

– Name.
– Description.
– URL.

the list of API-services is sorted (A,B,C..) by the Name of the API-service.

Continue reading

Stuff And Cache You Should Probably Delete From Your Google-Chrome

Either do it manually,
or add few “include” items to your CCleaner configuration-file.

first let’s break the profile-location for each of the operating-systems supported (Windows XP, Windows 7 and later, MacOS and Linux based – not including ChromeOS)

Windows (XP, 7 and later..)
C:\Documents and Settings\Elad\Local Settings\Application Data\Chromium\User Data\
C:\Documents and Settings\Elad\Local Settings\Application Data\Google\Chrome Canary\User Data\
C:\Documents and Settings\Elad\Local Settings\Application Data\Google\Chrome SxS\User Data\
C:\Documents and Settings\Elad\Local Settings\Application Data\Google\Chrome\User Data\
C:\Users\Elad\AppData\Local\Chromium\User Data\
C:\Users\Elad\AppData\Local\Google\Chrome Canary\User Data\
C:\Users\Elad\AppData\Local\Google\Chrome SxS\User Data\
C:\Users\Elad\AppData\Local\Google\Chrome\User Data\

Mac OS X:
~/Library/Application Support/Google/Chrome Canary/
~/Library/Application Support/Google/Chrome SxS/
~/Library/Application Support/Google/Chrome/


the folder-location you should empty-recursively or (simply delete the entire folder – it will be regenerated on next Chrome run) – sorry for the slash direction, on Mac/Linux just switch \ to / :)

\Crash Reports\
\Default\Application Cache\
\Default\File System\
\Default\Local Storage\
\Default\Media Cache\
\Default\Pepper Data\
\Default\Service Worker\ScriptCache\
\Default\Session Storage\

You probably want to switch from Elad to your user-name,
here is an example on how it should look inside (for example) ccleaner.ini file:
Include8=PATH|C:\Documents and Settings\Elad\Local Settings\Application Data\Chromium\User Data\Default\Cache\|*.*|RECURSE

feel free to run the following code in your console,
to generate a proper list which you can add to your CCleaner (or any batch file for example..)

when copy&paste don’t forget to
– change your user-name to something other than ‘Elad’, unless your name is ‘Elad’ too, in which case – this is awesome!! (you can send me email to say hello)
– remove the prefix and suffix of " chars from console :)
– make sure the start_from is indeed starting from first-new index inline,
this is tricky since ccleaner.ini is not sorted nicely, so you better drop its content into EditPlus and sort it by “numeric value”,
quickly find which one is the last line starting with “IncludeXXXXX=” the start_from should be this index plus one,
for example if your last “IncludeXX” line is Include41=PATH|C:\Users\Elad\AppData\Roaming\Macromedia\Flash Player\#SharedObjects|*.*|RECURSE – change the start index from 15 to 42 :)


which will generate about 118 items:


naturally you won't need all of them,
but you might do!

especially since:
- Chromium, Chrome and Chrome Canary can live in same computer quite happily :]
- folders that won't exist would simply be skipped,
- you might use the portable ccleaner version, where you might want to move the installation around few computers (on DiskOnKey or network location for example)
--- in this case you might even want to re-run the script for each user-name used (including Admin/Administrator/other.. accounts)
- better not use those fancy
%Profile% and other current profile shortcuts, the web is filled with stories about cases where CCleaner has emptied the entire hard-drive or user accounts (desktop and all!!!) because of “won’t fix” bug that (apparently still exist in newer versions).
— so don’t take a change and only use direct-folder names…

Vary: Accept-Encoding

Specify a Vary: Accept-Encoding header


Bugs in some public proxies may lead to compressed versions of your resources being served to users that don’t support compression. Specifying the Vary: Accept-Encoding header instructs the proxy to store both a compressed and uncompressed version of the resource.
Continue reading

Force Chrome Password Saving By Removing Event Handlers – The JSNinja Way!!!

(function (new_item) {
  document.querySelector('html').style.display="none"; //limit repaint."*"), function (item) {
    new_item = item.cloneNode(true);
    item.parentNode.replaceChild(new_item, item);


a more advanced method is removing the textual event-attribute,
but it is needed to be done AFTER the clone method (or all the attributes will be back… :( )

NodeList.prototype.forEach = Array.prototype.forEach; =;

var attributes, new_element;

  attributes = Object.keys(element.attributes).map(function(key_index){
    return element.attributes[key_index].nodeName

  attributes = attributes.filter(function(attribute){ return 0 === attribute.toLowerCase().indexOf("on") }); /* keep similar to events */

  /* remove event-handlers (dom level 2 and 3) */
  new_element = element.cloneNode(true);
  element.parentNode.replaceChild(new_element, element);

    //element[attribute] = null; //remove reference to ease up memory (override with empty) - event as DOM-handle.  --not needed (clone method is more effictive)
    element.removeAttribute(attribute); //remove event text - event as attribute


at this point the page (unless continuously renewing the event handlers..) is event free, placing the username, password, etc.. and submitting the form (either by submit button, which almost always has a non-ajax alternative, even on full ajax page, to better support older browsers – or executing a javascript code manually from console) will trigger Chrome’s password saving mechanism,
you are not necessarily need to be successfully logged-in,
all it means is that the login-data will be available next time you’ll be visiting the page, and then, naturally use the page without any modification (as it is)…

Bring Adobe Flash Back To Chromium (Solved)

ahhh… I had to figure out this one for myself from the source-code of Chromium (Chrome) project at: and… :(

New Chromium versions does not have Flash anymore!
– Chrome (regular and Canary) still does.

also, and there are no-people figuring out the solution yet, (as far as Googling around shows..)
so this post should be the first one to explain how to re-enable Adobe Flash on New Chromium installations.

it should be compatible with Windows, Mac and Linux installations.

Chromium not just disable Flash, but it does not ship with the ‘pepflashplayer.dll’,
in fact- the folder, named PepperFlash, which is the code-name for the embedded plugin for Flash, is empty:


you can look for pepflashplayer.dll in the Google-Chrome-Canary or regular versions and copy it to the folder but it won’t do anything (check using chrome://flash/)

for Chromium’s plugin-engine to identify the plugin, you’ll need to use some command-line switches,
but first let us play smart, assuming you’ll be updating Chromium somewhere in the future, the application folder will get overwritten so we’re not going to play with files and folders,
lets use the official Adobe plugin!

– download the latest Flash version from the
I currently developing some video-players with Flash fallback, so I’m using the “+Debugger” version.. but feel free to download the regular one.

its best for you to first download the uninstaller:
run it to clean the old versions (make all of the browsers are closed, even their background processes, just use task-manager and kill chrome.exe firefox.exe and iexplore.exe if any..)

then the IE version:, and install it.

then the “other” browsers version:, and install it.

and the “other other” browsers version:, and install it too.


in a second, we will be adding some command-line argument to Chromium, but first we need to find out where are the pepflashplayer{architecture}_version_ver._ver._ver.dll is located, and what is their named:

there are two folders:




one is holding the x32 version of Flash, and the other is holding the x64 version.
you can visit chrome://chrome/
to see what version you are using, I’m using the x64 version of Chromium for windows..

normally the C:\Windows\System32\Macromed\Flash holds the x32 version and the C:\Windows\SysWOW64\Macromed\Flash\ has the x64 version.

right! so the x64 version it is,

Adobe guys had a bug in the installation script, and the DLL FILES location are upside-down:

ok, so now we’ll be using two switches, one to disable the embedded-plugin (even that it is “not there”) and the other one to force load a flash-plugin from C:\Windows\System32\Macromed\Flash folder.

here is an example for the command line to load Chromium, with Flash support, (again):

C:\Users\Elad\AppData\Local\Chromium\Application\chrome.exe --disable-bundled-ppapi-flash --ppapi-flash-path="C:\Windows\System32\Macromed\Flash\pepflashplayer64_17_0_0_93.dll"

you may put it in a cmd file, or just create a shortcut for chrome.exe and after “OK”‘ing it, just re-edit it adding a --disable-bundled-ppapi-flash --ppapi-flash-path="C:\Windows\System32\Macromed\Flash\pepflashplayer64_17_0_0_93.dll" at the end.

sometimes sending arguments is hard in windows, most of the time there is a lot of inverted commas confusion and mix-ups.

you can download the exe and the ini file from my github page:

after you’ll run the exe a Chromium process will be created with the arguments passed directly to the Windows-API (so- FAST!) re-open the chrome://flash/ page, and see something like that:



JavaScript Beautiful Code Part #2/3 – Proper Coding – Avoiding Implicit Type Conversion

icompile.eladkarako.com_i_always_follow_the_proper_dress_codeMaybe only best used @ the end-point compile-script) to minify/obfuscate your code even more..

point mentioning that those *might* gives you a little street credit, but are considered a really bad practice,
and in no-way you should use those in actual live-code, at least, out of common courtesy for your fellow developers :]


  • :( x = !!y;
  • :) x = Boolean(y);

  • :( x = +y;
  • :) x = Number(y);

  • :( x = '' + y;
  • :) x = String(y);

  • :( x = ~s.indexOf('.');
  • :) x = s.indexOf('.') !== -1;

consider reading more about:
JSCS (JavaScript Code Style)
GJSLint (Google JavaScript Linter)

if you see those abominations,
be a pal, and fix it :)

JavaScript Mass Checkboxes Handler

assigning a shift key, one needs to click the first (or any) checkbox, holding the shift key and clicking the next (in a few) will check (on or off) the checkboxes in middle.

the script underneath can be loaded into a .user.js file to be use in Firefox (greasemonkey) or Chrome (also Chromium) Browsers.

// ==UserScript==
// @name           Mass Checkboxes Handler
// @description    Handle Multiple Checkboxes Clicking With Ease. Click The First, Hold [SHIFT] and Click The Last, All Checkboxes That Are In Range Would Be Checked/UnChecked Too. Easy And Fast! Compatible With Chrome and Firefox.
// @namespace
// @homepage
// @include        http://*
// @include        https://*
// @include        file:///*
// @exclude        http://**/*
// @exclude        https://**/*
// @version        d02.m06.y2010
// ==/UserScript==
window.addEventListener("load", function () {
    function j(a) {
        return a == "html" ? "" : null

    function g(a) {
        var c =;
        if (c.tagName.toUpperCase() == "INPUT" && c.type == "checkbox" && (a.button == 0 || a.keyCode == 32)) {
            if (a.shiftKey && e) {
                a = e;
                var d, b, f, h = document.evaluate(document.documentElement.namespaceURI ? "//html:input[@type='checkbox']" : "//input[@type='checkbox']", document, j, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
                for (d = 0; b = h.snapshotItem(d); ++d) {
                    if (b == c) {
                        f = a;
                    if (b == a) {
                        f = c;
                for (; b = h.snapshotItem(d); ++d) {
                    if (b != a && b != c && b.checked != a.checked) {
                        var i = document.createEvent("MouseEvents");
                        i.initEvent("click", true, false);
                    if (b == f) break
            e = c
    var e = null;
    document.documentElement.addEventListener("keyup", g, true);
    document.documentElement.addEventListener("click", g, true)
}(), false);


Chromium Browser – The Future Of Google Chrome

Chromium is the code-name for Google Chrome development project, the nightly-builds are available for download, and are, mostly, fully functional.

home page for the project.
new builds are available to download here.

I’ve made download script, and a small vb6 program to find the latest version, to make it work you would need those 3 things:
1. wGet.
2. this program: Latest Chromium URL.
3. the following script into a blank CMD (or BAT) file:

@echo off
if exist mini_installer.exe del /f /q mini_installer.exe
setlocal enableextensions
for /f "tokens=*" %%a in ('.\LatestChromiumURL.exe') do (set sURL=%%a)
set sUserAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20091201 Firefox/3.5.6"
wget --directory-prefix=. --user-agent=%sUserAgent% %sURL%

4. put the (1),