Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我通过 SSL 提供一个页面,并且我做一个 AJAX 帖子:
$.post('/core/somepage.php', ....);
帖子是通过 HTTPS 发布的,还是我必须输入一个绝对 URL,例如:
$.post('https://example.com/core/somepage.php', ....);
此外,这是否适用于:
$('#element').load('/core/something.php');
?
是的,帖子将通过https. 根据定义,相对路径使用当前方案。你知道吗,你甚至可以做一些事情,比如//example.com/somepage如果你想去一个明确的主机但保持当前的方案。
https
//example.com/somepage