首页 \ 问答 \ 即时发布“prerender”?(Issue “prerender” 'on the fly'?)

即时发布“prerender”?(Issue “prerender” 'on the fly'?)

是否有可能发布prerender语句“即时”? 例如我使用jQuery来插入它

<link rel="prerender" href="www.example.com" />

进入和它会执行? 有没有办法重新发布它x次?

基本上,当某人向购物车中添加了某项内容时,我想预先显示结帐页面,但很明显,我无法在网页加载时执行此操作,因为它会在没有添加新项目的情况下预渲染结帐页面。

谢谢


Is it possible to issue a prerender statement 'on the fly'? e.g. I use jQuery to insert this in

<link rel="prerender" href="www.example.com" />

into the and it will execute? Is there a way to re-issue it x times?

Basically, when someone adds something to the shopping cart I want to prerender the checkout page, but obviously I can't do that at page load because it will prerender the checkout page without the new item added.

Thanks


原文:https://stackoverflow.com/questions/43260602
更新时间:2022-04-02 09:04

最满意答案

W3C为几乎所有您能想到的案例定义了非常具体的状态代码 。 针对您的特定需求:

  • 未找到:404
  • 服务不可用:503

The W3C defines very specific status codes for nearly all cases you can think of. For your specific needs:

  • Not Found: 404
  • Service Unavailable: 503

相关问答

更多
  • 这是从我的博客文章的url路由授权和元素安全在这里,但我将简要总结要点:-) 前端Web应用程序中的安全性仅仅是停止Joe Public的一个起始措施,但是任何具有某些Web知识的用户都可以绕过它,因此您也应始终具有安全性服务器端。 关于安全问题的关键在于路由安全性,幸运的是,当您定义一个有角度的路由时,您将创建一个对象,一个可以具有其他属性的对象。 我的方法的基石是将一个安全对象添加到此路由对象中,该对象基本上定义了用户必须能够访问特定路由的角色。 // route which requires the ...
  • ReSTful API主要由其他系统使用,这就是为什么我将分页数据放在响应头中。 但是,一些API消费者可能无法直接访问响应头,或者可能通过API构建一个UX,因此提供一种方法来检索(按需)JSON响应中的元数据是一个加号。 我相信你的实现应该包括默认的机器可读元数据,以及在请求时可读的元数据。 如果您喜欢,或者最好通过查询参数(如include=metadata或include_metadata=true进行按需访问,则可以随每个请求返回人类可读的元数据。 在您的特定情况下,我将包括每个产品的URI与记录 ...
  • REST中的身份验证概述 在REST API中,当访问需要身份验证的受保护资源时,每个请求都必须包含要经过适当身份验证/授权的所有必需数据。 身份验证数据(凭据)应属于标准HTTP Authorization标头: 4.2。 授权 Authorization标头字段允许用户代理使用源服务器进行身份验证 - 通常(但不一定)在收到401 (未授权)响应后。 其值由包含所请求资源领域的用户代理的认证信息的凭证组成。 Authorization = credentials [...] 请注意,此HTTP标头的名 ...
  • 我意识到PUT方法不适合我。 使用POST方法,而不是保存我的一天。 I realized that PUT method is not working with me. Using POST method instead saved my day.
  • 对例外的回应 您可以通过处理App\Exceptions\Handler的异常来完成此操作。 你可以在render方法中使用它,喜欢: /** * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request * @param \Exception $e * @return \Illuminate\Http\Response */ public function render ...
  • 我的问题是,我应该如何为“暂停”这样的动作设计API? 您如何设计一个网站来支持“暂停”等操作? 您可能从登录页面开始,客户端可以获取。 您返回的响应可能表示作业的当前状态,并且还具有链接,具有用户可以理解的语义注释。 其中之一就是“暂停”行动。 在暂停链接之后,可能会获得一个表单,其中包含许多输入字段,每个字段的语义注释以及每个字段的默认值。 客户端将替换输入字段中的部分或全部值,并提交表单。 这会将表单数据POST到您指定的端点,此时您的实现将调用暂停副作用,并使用描述结果的表示进行响应。 这是要遵循的 ...
  • 203是返回数据的字节长度,它不是响应代码。 第一行的响应为203字节,服务时间为0.4秒,第二行为8字节,耗时0.3秒。 两者都是GET请求,响应代码在两种情况下均为200 。 The 203 is the length in bytes of the returned data, it is not a response code. The response in the first line was 203 bytes and took 0.4 seconds to serve, and the se ...
  • W3C为几乎所有您能想到的案例定义了非常具体的状态代码 。 针对您的特定需求: 未找到:404 服务不可用:503 The W3C defines very specific status codes for nearly all cases you can think of. For your specific needs: Not Found: 404 Service Unavailable: 503
  • 如果客户端用于通过POST调用服务器(即HttpPost httppost = new HttpPost("http://www.yoursite.com/script.php");在android中)那么你将获得用户在$_POST发布的所有数据$_POST 如果你是初学者关于休息时间,请不要在这个级别搞乱数据库,只需创建页面 并从客户端调用它,你会得到更多的路径:) if client is using to call server ...
  • 我知道你正在使用Java,但我对节点更熟悉,因此我更容易以这种方式进行原型设计。 希望它能翻译而不会有太多麻烦。 这是我在节点中创建的原型函数。 目标是将错误对象作为JSON响应主体返回。 status属性将用于映射到相应的HTTP状态。 exports.handler = function(event, context) { var response = { status: 400, message: "Error details", path: " ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)