Adobe 的 Typekit 在嘗試純 CSS 版本的網頁字型了

先前 Typekit 需要使用 JavaScript,現在則是開始嘗試純 CSS 版本了:「Now in Early Access: Serve web fonts without JavaScript」。

然後另外發現 use.typekit.net 以前是 EdgeCast,現在變成 Akamai 了...

nginx 的 mirror 功能

nginx 1.13.4 出的新功能,ngx_http_mirror_module

The ngx_http_mirror_module module (1.13.4) implements mirroring of an original request by creating background mirror subrequests. Responses to mirror subrequests are ignored.

範例其實就講的還蠻清楚的:

location / {
    mirror /mirror;
    proxy_pass http://backend;
}

location /mirror {
    internal;
    proxy_pass http://test_backend$request_uri;
}

如果拿 nginx 當 load balancer 的人,可以用這個功能做些事情...

AWS CloudWatch 推出秒級的記錄功能

AWS CloudWatch 推出了秒級的記錄功能:「New – High-Resolution Custom Metrics and Alarms for Amazon CloudWatch」。

從一分鐘變成一秒鐘讓之後的調整以及 debug 好用很多... 不過這次支援秒級的是 custom metrics,原先 AWS 自家服務的支援不在這次範圍:

Today we are adding support for high-resolution custom metrics, with plans to add support for AWS services over time. Your applications can now publish metrics to CloudWatch with 1-second resolution.

另外 alarm 的時間可以降到十秒:

You can watch the metrics scroll across your screen seconds after they are published and you can set up high-resolution CloudWatch Alarms that evaluate as frequently as every 10 seconds.

對於市場上一堆服務的衝擊應該不小 XD

Million Dollar Homepage 上的網站存活率

作者在分析 2005 年炒熱話題的 Million Dollar Homepage,上面所列的網站的存活比率:「A Million Squandered: The “Million Dollar Homepage” as a Decaying Digital Artifact」。

這是作者在 2017 年抓的截圖:

而這是分析圖:

作者跑程式分析,其中大約一半的 pixel 已經失效:

The 547 unreachable links are attached to graphical elements that collectively take up 342,000 pixels (face value: $342,000). Redirects account for a further 145,000 pixels (face value: $145,000).

不過如果以網站數量來看,則大約還有 63% 活著:

Of the 2,816 links that embedded on the page (accounting for a total of 999,400 pixels), 547 are entirely unreachable at this time. A further 489 redirect to a different domain or to a domain resale portal, leaving 1,780 reachable links.

突然有種「銀河的歷史又翻過了一頁」的感覺 XDDD

Adobe Flash 將在 2020 年 End of Life

Adobe 發出的公告,將在 2020 年中止所有對 Flash 的支援:「Flash & The Future of Interactive Content」。

Specifically, we will stop updating and distributing the Flash Player at the end of 2020 and encourage content creators to migrate any existing Flash content to these new open formats.

然後 GoogleMicrosoft 也來補刀講兩句話:「So long, and thanks for all the Flash」、「Saying goodbye to Flash in Chrome」、「The End of an Era – Next Steps for Adobe Flash」。

CityBikes 的網站 (以及 API)

看到 yllan 在 Twitter 上提到 CityBikes 這個站台:

把 YouBike 打進去搜尋後選台北市,可以看到是有紅色與綠色的泡泡會一直冒出來... 我猜是借車與還車?所以有提供這樣的 API 可以用?這看起來不錯耶...

Web Cache Deception Attack

在「How (Not) to Control Your CDN」這邊看到了「Web Cache Deception Attack」這個攻擊方式。

攻擊的手法是利用網站會把 /user/personal-info/foo.css/user/personal-info 視為一樣的內容時,配合 CDN 或是 reverse proxy server 會把 .css 設定無差異 cache 時,就可以在 cache server (cache edge) 取得使用者的敏感資料。

這主要是 url routing 的條件放太寬造成的。

另外 Mark Nottingham 還建議 cache 應該在 origin server 上控制,而非在 CDN 上設定。也就是說,在 origin server 上送出 Cache-Control,讓 CDN 或是 reverse proxy server 使用這個值來判斷 cache。

nginx 1.13 將支援 TLSv1.3

nginx 的「CHANGES」這邊看到 1.13.0 把 TLSv1.3 加進去了 (雖然都還沒成為正式的標準,但一堆人都在支援 XDDD):

*) Feature: the "TLSv1.3" parameter of the "ssl_protocols" directive.

這樣以後出 1.14 的 stable 版本應該就可以玩 TLSv1.3 了...

透過 NN (類神經網路) 訓練好的系統,直接把圖片轉成程式碼

這個禮拜被 AlphaGo 洗臉後,又看到來搶工作的東西了:「pix2code: Generating Code from a Graphical User Interface Screenshot」。

直接把 Mockup 圖檔丟進去,然後就把 iOS 或是 HTML 程式碼生出來:

不過「刻 UI」的確是工程師最討厭的事情啦,這部份能自動化要怎麼說呢... 好像也是不錯的事情啦 @_@

用 unicode-range 混合不同的字型

Combining fonts」這邊示範了如何使用 CSS 的 unicode-range 針對某些特殊字元混用不同的字型,作者利用這個技巧,把 hyphen 與 equals 換掉...:

看了一下,支援度還蠻高的?IE 支援度是 9+ 的功能...