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

Feature Request: Litmus incognito reminder #2

Open
VibroAxe opened this issue Feb 28, 2020 · 4 comments
Open

Feature Request: Litmus incognito reminder #2

VibroAxe opened this issue Feb 28, 2020 · 4 comments

Comments

@VibroAxe
Copy link
Member

If a browser is switched into incognito mode the dns and hsts caches are removed. As such the litmus test should always be run from a "clean" browser. Apparently on chrome/firefox this can be detected with the following:

if ('storage' in navigator && 'estimate' in navigator.storage) {
	const {usage, quota} = await navigator.storage.estimate();
    console.log(`Using ${usage} out of ${quota} bytes.`);

	if(quota < 120000000){
        console.log('Incognito')
    } else {
        console.log('Not Incognito')
    }	
} else {
	console.log('Can not detect')
}

Adding a big model to the front of the litmus site reminding people to switch to a fresh incognito mode before trusting the results seems like a sensible idea

@VibroAxe
Copy link
Member Author

Actually, a general reminder about this at the top of the site doesn't seem like a bad idea as well

@VibroAxe
Copy link
Member Author

@Crabbey you able to look at and add this at all some time?

@Crabbey
Copy link
Contributor

Crabbey commented Feb 28, 2020

I'll look at this tomorrow, hopefully

@VibroAxe
Copy link
Member Author

Schweet (probably worth checking my snippet btw)

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

No branches or pull requests

2 participants