Skip to content

Commit

Permalink
Closes #1988 Preconnect all external resources and load them async
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Herzog committed Oct 20, 2020
1 parent e0b792d commit faa1ba2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
Expand Up @@ -5,6 +5,9 @@

Html.AddTitleParts(T("PageTitle.Checkout").Text);
Html.AddCssFileParts(true, Url.Content("~/Plugins/SmartStore.AmazonPay/Content/SmartStore.AmazonPay.css"));

var url = new Uri(Model.WidgetUrl);
Html.AddLinkPart("preconnect", "https://" + url.Host);
}

@section orderProgress{
Expand Down
Expand Up @@ -6,6 +6,9 @@

Html.AddTitleParts(T("PageTitle.Checkout").Text);
Html.AddCssFileParts(true, Url.Content("~/Plugins/SmartStore.AmazonPay/Content/SmartStore.AmazonPay.css"));

var url = new Uri(Model.WidgetUrl);
Html.AddLinkPart("preconnect", "https://" + url.Host);
}

@section orderProgress{
Expand Down
Expand Up @@ -3,6 +3,9 @@
@{
Html.AddCssFileParts(true, Url.Content("~/Plugins/SmartStore.AmazonPay/Content/SmartStore.AmazonPay.css"));
Html.AddScriptParts(true, "~/Plugins/SmartStore.AmazonPay/Scripts/jquery.deserialize.js");

var url = new Uri(Model.WidgetUrl);
Html.AddLinkPart("preconnect", "https://" + url.Host);
}

<script>
Expand Down
@@ -1,9 +1,14 @@
@using SmartStore.PayPal
@using SmartStore.PayPal.Models
@model PayPalPlusCheckoutModel

@{
Html.AddLinkPart("preconnect", "https://www.paypalobjects.com");
}

<script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
<script>
$(function () {
var payPalPlus = PAYPAL.apps.PPP({
approvalUrl: "@Html.Raw(Model.ApprovalUrl)",
Expand Down

0 comments on commit faa1ba2

Please sign in to comment.