惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
I
InfoQ
The Register - Security
The Register - Security
L
LangChain Blog
H
Help Net Security
The GitHub Blog
The GitHub Blog
S
Schneier on Security
博客园 - 【当耐特】
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
IT之家
IT之家
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
The Cloudflare Blog
H
Heimdal Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
雷峰网
雷峰网
N
Netflix TechBlog - Medium
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
Lohrmann on Cybersecurity
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Exploit Database - CXSecurity.com
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
V
Visual Studio Blog
博客园 - 聂微东
PCI Perspectives
PCI Perspectives
Last Week in AI
Last Week in AI
A
Arctic Wolf
宝玉的分享
宝玉的分享
T
The Blog of Author Tim Ferriss
S
Secure Thoughts
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
SecWiki News
SecWiki News
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
Schneier on Security
Schneier on Security
P
Proofpoint News Feed
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
AI
AI
Engineering at Meta
Engineering at Meta

endtimes.dev

Happy new year | endtimes.dev why lowercase letters save data Practical betterments | endtimes.dev Short posts and some site updates Input Output | endtimes.dev Actually, dark mode can save the planet Why your website should be under 14kB in size HTML and CSS only multiple color scheme picker Why your website should work without Javascript. An HTML and CSS only dark-mode toggle button. you can use css to remove the double-tap zoom feature on iOs Missing Dice | endtimes.dev Can Dark Mode Save Battery Life and Human Civilzation? Your DNS has a significant impact on site speed. Add spaces to the dock on MacOS You can leave out <html>, <head>, and <body> tags. Listen for changes between dark and light mode with javascript Use a keyboard shortcut to quickly toggle light and dark mode on MacOs. Why Your Website Should Use Dithered Images You can restore the startup chimes on MacOS Emoji Clipboard | endtimes.dev You can use Emojis as Favicons Prod — Block Distractions. Achieve your goals. Pattern generator | endtimes.dev Green Quarantine | endtimes.dev Qwitter Bot | endtimes.dev
.dev and HSTS preload | endtimes.dev
2020-10-08 · via endtimes.dev

TL;DR — The .dev TLD has the advantage of being on the HSTS preload list, without needing the strict-transport-security header. Giving your site a small performance boost.

I first heard about this watching Andrew Betts talk Headers for Hackers from Performance.now(), it’s a good talk.

What is HSTS? #

HSTS (http strict transport security) is an http header. It lets a website tell the browser to only connect to it via https.

This helps prevent man-in-the-middle attacks. It also reduces load times for users trying to connect via http. Their browser will automatically upgrade their connection to https instead of your server redirecting them.

However, the browser can only know about your site’s HSTS policy once it’s already accessed it once. So if the initial request to your site is via http, there is still a risk. This is where HSTS preload comes in…

HSTS preload allows you to make sure browsers always connect via https, even when connecting to your website for the first time.

Appending preload to your strict-transport-security header will automatically add your domain to the HSTS preload list maintained by google.

When a user navigates to your site for the first time, most browsers will check this list. If your site is on the list, the user will upgraded to HTTPS.

.dev #

Any domain with the .dev TLD are by default in the HSTS preload list. This means you get the security and performance of having the strict-transport-security header, with the bonus of not actually needing the header.

So, by using .dev you can save 71 bytes in every response from your site, and stop the client from parsing an unnecessary header.

Strict-Transport-Security: max-age=63072000; includeSubDomains; preload

Other domains #

As well as .dev, all of Google’s other TLDs are automatically on the HSTS preload list. Here's the complete list of availble google TLDs (as of 8 October 2020):

.app, .baby, .blog, .book, .buy, .cloud, .corp, .cpa, .dds, .dev, .diy, .docs, .dog, .dot, .drive, .earth, .family, .film, .free, .fun, .fyi, .game, .gmbh, .goo, .home, .inc, .live, .llc, .llp, .lol, .love, .mail, .map, .mba, .med, .mom, .moto, .movie, .music, .pet, .phd, .play, .plus, .search, .shop, .show, .site, .spot, .srl, .store, .talk, .team, .tech, .tube, .vip, .web, .wow, .you

source : icannwiki.org/google

Netlify Caveat #

I really thought I was being so cheeky and clever when I did this. But of course, I host my sites on Netlify and they don't let you remove the Strict-Transport-Security header.

However they do allow you to remove this bit: ; includeSubdomains; preload, but that's still something!

published
7 Oct 2020
modified
7 Oct 2020
author
Nathaniel
tags
posts post web performance security HTTP