Skip to content

Cache not disabled on Chrome browser when passing disable arguments #4580

@2343909

Description

@2343909

Have you read the documentation?

URL

script with multiple urls

What are you trying to accomplish

We have a need to collect perf metrics on the page when cache is disabled or nothing is cached on the client Browser.
I tried to accomplish this with several sitespeed.io provided command line arguments but none appear to work:

  • --browsertime.chrome.args="--disable-cache,--disable-application-cache"
  • --browsertime.cacheClearRaw true --browsertime.cacheClear true

What browser did you use?

Chrome

How to reproduce

Execute the script on Windows Desktop as follows:
 
node bin/sitespeed.js -b chrome -n 1 --browsertime.chrome.args="--disable-cache,--disable-application-cache" --browsertime.chrome.args="--incognito" --firstParty .*domain.* --video --visualMetrics --multi search_notCached.mjs


Here is the script: 

/**
 *
 * @param {import('browsertime').BrowsertimeContext} context
 * @param {import('browsertime').BrowsertimeCommands} commands
 */
export default async function (context, commands) {
    const seleniumWebdriver = context.selenium.webdriver;
    const By = seleniumWebdriver.By;
    const seleniumDriver = context.selenium.driver;
    await seleniumDriver.manage().window().maximize();

    await commands.navigate(
        'https://domain/';

        await seleniumDriver.findElement(By.id('searchval')).sendKeys('green cup');
        const search = await seleniumDriver.findElement(By.xpath('//div[contains(@class,"lt:flex")]//button[@value="Search"]'));
        await commands.measure.start('Search');
        await search.click();
        await commands.wait.byPageToComplete();
        await commands.measure.stop();
};


Still shows memory and disk cache for JS: 

---See image showing cache happening in the previous section above---

Log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions