Resource Hints – What is Preload, Prefetch, and Preconnect?[转]

Today we are going to explore current resource hints and directives which can be another great way to boost the performance on your website or web application. You might have heard of preload, prefetch, and preconnect, but we want to dive deeper into the differences between them how you can benefit from them. Some of the advantages of these is that they allow web developers to optimize delivery of resources, reduce round trips, and fetch resources to deliver content faster while a user is browsing a page.

"Resource Hints – What is Preload, Prefetch, and Preconnect?[转]"继续阅读

HTTP 跨域时的 options 请求[转]

一、简介

出于安全考虑,并不是所有域名访问后端服务都可以。其实在正式跨域之前,浏览器会根据需要发起一次预检(也就是 options 请求),用来让服务端返回允许的方法(如 GET、POST),被跨域访问的 Origin(来源或者域),还有是否需要 Credentials(认证信息)等。那么浏览器在什么情况下能预检呢?

"HTTP 跨域时的 options 请求[转]"继续阅读