harshg
April 17, 2022, 6:32pm
1
Hi everyone. I was all set to launch my online store when I noticed a very weird problem. Once any page fully loads on my shopify website with all the widgets and apps, the web page does not go back to the previous page on a single click of the back button (built in the browser). I have to click it twice every time to navigate it back to the previous page. When I click the back button once, the page gets stuck on loading and does not go back. This happens only when the page fully loads. If I click on back button without the page fully loading, I am able to go back in a single click.
This issue happens regularly on mobile. It also happens on desktop most of the time but sometimes it gets fixed on its own. Please help as this issue is very disturbing and may lead to a lot of drop offs on my page!!
The store URL is www.vignetoluxury.com
Summer
April 18, 2022, 1:13am
2
Hey, @harshg ! Welcome to Shopify Community!
I visited your website on mobile and I can see the issue happening on my end. Since this is the case, there’s a likelihood that the issue is within your theme. As you’re using Dawn , which is a Shopify theme, it’s best that we have it looked at by our Theme Support so we can check if the issue is caused by a bug or an app that you’re using. If it’s a bug, they may likely be able to help you fix it, however, if it’s caused by an app, you will need to contact the app developers for assistance.
Please visit https://bit.ly/3cJkx8V and log in to your account to create a support request. After visiting the link and logging in, you’ll be prompted to enter the topic of your concern so we can connect you to the right articles and support team. Simply type in the topic, click Search then scroll down to the bottom of the page to click Continue under Get Support . You’ll then see the option to create a support ticket on the next page.
When you get the issue fixed, you may want to consider adding a favicon to your website. The favicon is the little logo that appears beside your store name on the browser tab. This tiny detail may seem trivial due to its size, but it holds more importance than we think. The favicon helps users recognize and identify your website easily and it also makes your store appear to have a cohesive branding. I highly suggest adding one so you can further improve and increase brand recognition. We have a guide on doing so here: Adding a favicon to your store .
Hi Harshg,
I’m Richard Nguyen- CRO Expert at PageFly- Free Landing Page Builder . Regards your problem, it appears to be a cache issue from Safari and it is kind of a development problem. The proper solution to this is the developer of your theme updates their code. Specifically, your theme window events handling.
You can also fix it by forcing the page to not use the cache anymore. Please try adding onunload=“” to your page body tag.
Open the theme.liquid file then find the body tag, add it so the body should look like this
Please try and let me know if it works for you.
Best regards,
Richard - PageFly
harshg
April 18, 2022, 2:28am
4
Hi @PageFly-Richard ,
Thank you for your reply. I am still new to the coding world and was unable to figure out where exactly the new code is supposed to be pasted. I can see body at quite a few places in theme.liquid. I am pasting the entire code below. Can you tell the exact place where I need to write the new code?
{%- if settings.favicon != blank -%}
{%- endif -%}
{%- unless settings.type_header_font.system? and settings.type_body_font.system? -%}
{%- endunless -%}
{% if page_description %}
{% endif %}
{% render 'meta-tags' %}
{{ content_for_header }}
{%- liquid
assign body_font_bold = settings.type_body_font | font_modify: 'weight', 'bold'
assign body_font_italic = settings.type_body_font | font_modify: 'style', 'italic'
assign body_font_bold_italic = body_font_bold | font_modify: 'style', 'italic'
%}
{% style %}
{{ settings.type_body_font | font_face: font_display: 'swap' }}
{{ body_font_bold | font_face: font_display: 'swap' }}
{{ body_font_italic | font_face: font_display: 'swap' }}
{{ body_font_bold_italic | font_face: font_display: 'swap' }}
{{ settings.type_header_font | font_face: font_display: 'swap' }}
:root {
--font-body-family: {{ settings.type_body_font.family }}, {{ settings.type_body_font.fallback_families }};
--font-body-style: {{ settings.type_body_font.style }};
--font-body-weight: {{ settings.type_body_font.weight }};
--font-heading-family: {{ settings.type_header_font.family }}, {{ settings.type_header_font.fallback_families }};
--font-heading-style: {{ settings.type_header_font.style }};
--font-heading-weight: {{ settings.type_header_font.weight }};
--font-body-scale: {{ settings.body_scale | divided_by: 100.0 }};
--font-heading-scale: {{ settings.heading_scale | times: 1.0 | divided_by: settings.body_scale }};
--color-base-text: {{ settings.colors_text.red }}, {{ settings.colors_text.green }}, {{ settings.colors_text.blue }};
--color-shadow: {{ settings.colors_text.red }}, {{ settings.colors_text.green }}, {{ settings.colors_text.blue }};
--color-base-background-1: {{ settings.colors_background_1.red }}, {{ settings.colors_background_1.green }}, {{ settings.colors_background_1.blue }};
--color-base-background-2: {{ settings.colors_background_2.red }}, {{ settings.colors_background_2.green }}, {{ settings.colors_background_2.blue }};
--color-base-solid-button-labels: {{ settings.colors_solid_button_labels.red }}, {{ settings.colors_solid_button_labels.green }}, {{ settings.colors_solid_button_labels.blue }};
--color-base-outline-button-labels: {{ settings.colors_outline_button_labels.red }}, {{ settings.colors_outline_button_labels.green }}, {{ settings.colors_outline_button_labels.blue }};
--color-base-accent-1: {{ settings.colors_accent_1.red }}, {{ settings.colors_accent_1.green }}, {{ settings.colors_accent_1.blue }};
--color-base-accent-2: {{ settings.colors_accent_2.red }}, {{ settings.colors_accent_2.green }}, {{ settings.colors_accent_2.blue }};
--payment-terms-background-color: {{ settings.colors_background_1 }};
--gradient-base-background-1: {% if settings.gradient_background_1 != blank %}{{ settings.gradient_background_1 }}{% else %}{{ settings.colors_background_1 }}{% endif %};
--gradient-base-background-2: {% if settings.gradient_background_2 != blank %}{{ settings.gradient_background_2 }}{% else %}{{ settings.colors_background_2 }}{% endif %};
--gradient-base-accent-1: {% if settings.gradient_accent_1 != blank %}{{ settings.gradient_accent_1 }}{% else %}{{ settings.colors_accent_1 }}{% endif %};
--gradient-base-accent-2: {% if settings.gradient_accent_2 != blank %}{{ settings.gradient_accent_2 }}{% else %}{{ settings.colors_accent_2 }}{% endif %};
--media-padding: {{ settings.media_padding }}px;
--media-border-opacity: {{ settings.media_border_opacity | divided_by: 100.0 }};
--media-border-width: {{ settings.media_border_thickness }}px;
--media-radius: {{ settings.media_radius }}px;
--media-shadow-opacity: {{ settings.media_shadow_opacity | divided_by: 100.0 }};
--media-shadow-horizontal-offset: {{ settings.media_shadow_horizontal_offset }}px;
--media-shadow-vertical-offset: {{ settings.media_shadow_vertical_offset }}px;
--media-shadow-blur-radius: {{ settings.media_shadow_blur }}px;
--page-width: {{ settings.page_width | divided_by: 10 }}rem;
--page-width-margin: {% if settings.page_width == '1600' %}2{% else %}0{% endif %}rem;
--card-image-padding: {{ settings.card_image_padding | divided_by: 10.0 }}rem;
--card-corner-radius: {{ settings.card_corner_radius | divided_by: 10.0 }}rem;
--card-text-alignment: {{ settings.card_text_alignment }};
--card-border-width: {{ settings.card_border_thickness | divided_by: 10.0 }}rem;
--card-border-opacity: {{ settings.card_border_opacity | divided_by: 100.0 }};
--card-shadow-opacity: {{ settings.card_shadow_opacity | divided_by: 100.0 }};
--card-shadow-horizontal-offset: {{ settings.card_shadow_horizontal_offset | divided_by: 10.0 }}rem;
--card-shadow-vertical-offset: {{ settings.card_shadow_vertical_offset | divided_by: 10.0 }}rem;
--card-shadow-blur-radius: {{ settings.card_shadow_blur | divided_by: 10.0 }}rem;
--badge-corner-radius: {{ settings.badge_corner_radius | divided_by: 10.0 }}rem;
--popup-border-width: {{ settings.popup_border_thickness }}px;
--popup-border-opacity: {{ settings.popup_border_opacity | divided_by: 100.0 }};
--popup-corner-radius: {{ settings.popup_corner_radius }}px;
--popup-shadow-opacity: {{ settings.popup_shadow_opacity | divided_by: 100.0 }};
--popup-shadow-horizontal-offset: {{ settings.popup_shadow_horizontal_offset }}px;
--popup-shadow-vertical-offset: {{ settings.popup_shadow_vertical_offset }}px;
--popup-shadow-blur-radius: {{ settings.popup_shadow_blur }}px;
--drawer-border-width: {{ settings.drawer_border_thickness }}px;
--drawer-border-opacity: {{ settings.drawer_border_opacity | divided_by: 100.0 }};
--drawer-shadow-opacity: {{ settings.drawer_shadow_opacity | divided_by: 100.0 }};
--drawer-shadow-horizontal-offset: {{ settings.drawer_shadow_horizontal_offset }}px;
--drawer-shadow-vertical-offset: {{ settings.drawer_shadow_vertical_offset }}px;
--drawer-shadow-blur-radius: {{ settings.drawer_shadow_blur }}px;
--spacing-sections-desktop: {{ settings.spacing_sections }}px;
--spacing-sections-mobile: {% if settings.spacing_sections < 24 %}{{ settings.spacing_sections }}{% else %}{{ settings.spacing_sections | times: 0.7 | round | at_least: 20 }}{% endif %}px;
--grid-desktop-vertical-spacing: {{ settings.spacing_grid_vertical }}px;
--grid-desktop-horizontal-spacing: {{ settings.spacing_grid_horizontal }}px;
--grid-mobile-vertical-spacing: {{ settings.spacing_grid_vertical | divided_by: 2 }}px;
--grid-mobile-horizontal-spacing: {{ settings.spacing_grid_horizontal | divided_by: 2 }}px;
--text-boxes-border-opacity: {{ settings.text_boxes_border_opacity | divided_by: 100.0 }};
--text-boxes-border-width: {{ settings.text_boxes_border_thickness }}px;
--text-boxes-radius: {{ settings.text_boxes_radius }}px;
--text-boxes-shadow-opacity: {{ settings.text_boxes_shadow_opacity | divided_by: 100.0 }};
--text-boxes-shadow-horizontal-offset: {{ settings.text_boxes_shadow_horizontal_offset }}px;
--text-boxes-shadow-vertical-offset: {{ settings.text_boxes_shadow_vertical_offset }}px;
--text-boxes-shadow-blur-radius: {{ settings.text_boxes_shadow_blur }}px;
--buttons-radius: {{ settings.buttons_radius }}px;
--buttons-radius-outset: {% if settings.buttons_radius > 0 %}{{ settings.buttons_radius | plus: settings.buttons_border_thickness }}{% else %}0{% endif %}px;
--buttons-border-width: {% if settings.buttons_border_opacity > 0 %}{{ settings.buttons_border_thickness }}{% else %}0{% endif %}px;
--buttons-border-opacity: {{ settings.buttons_border_opacity | divided_by: 100.0 }};
--buttons-shadow-opacity: {{ settings.buttons_shadow_opacity | divided_by: 100.0 }};
--buttons-shadow-horizontal-offset: {{ settings.buttons_shadow_horizontal_offset }}px;
--buttons-shadow-vertical-offset: {{ settings.buttons_shadow_vertical_offset }}px;
--buttons-shadow-blur-radius: {{ settings.buttons_shadow_blur }}px;
--buttons-border-offset: {% if settings.buttons_radius > 0 or settings.buttons_shadow_opacity > 0 %}0.3{% else %}0{% endif %}px;
--inputs-radius: {{ settings.inputs_radius }}px;
--inputs-border-width: {{ settings.inputs_border_thickness }}px;
--inputs-border-opacity: {{ settings.inputs_border_opacity | divided_by: 100.0 }};
--inputs-shadow-opacity: {{ settings.inputs_shadow_opacity | divided_by: 100.0 }};
--inputs-shadow-horizontal-offset: {{ settings.inputs_shadow_horizontal_offset }}px;
--inputs-margin-offset: {% if settings.inputs_shadow_vertical_offset != 0 and settings.inputs_shadow_opacity > 0 %}{{ settings.inputs_shadow_vertical_offset | abs }}{% else %}0{% endif %}px;
--inputs-shadow-vertical-offset: {{ settings.inputs_shadow_vertical_offset }}px;
--inputs-shadow-blur-radius: {{ settings.inputs_shadow_blur }}px;
--inputs-radius-outset: {% if settings.inputs_radius > 0 %}{{ settings.inputs_radius | plus: settings.inputs_border_thickness }}{% else %}0{% endif %}px;
--variant-pills-radius: {{ settings.variant_pills_radius }}px;
--variant-pills-border-width: {{ settings.variant_pills_border_thickness }}px;
--variant-pills-border-opacity: {{ settings.variant_pills_border_opacity | divided_by: 100.0 }};
--variant-pills-shadow-opacity: {{ settings.variant_pills_shadow_opacity | divided_by: 100.0 }};
--variant-pills-shadow-horizontal-offset: {{ settings.variant_pills_shadow_horizontal_offset }}px;
--variant-pills-shadow-vertical-offset: {{ settings.variant_pills_shadow_vertical_offset }}px;
--variant-pills-shadow-blur-radius: {{ settings.variant_pills_shadow_blur }}px;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
html {
box-sizing: border-box;
font-size: calc(var(--font-body-scale) * 62.5%);
height: 100%;
}
body {
display: grid;
grid-template-rows: auto auto 1fr auto;
grid-template-columns: 100%;
min-height: 100%;
margin: 0;
font-size: 1.5rem;
letter-spacing: 0.06rem;
line-height: calc(1 + 0.8 / var(--font-body-scale));
font-family: var(--font-body-family);
font-style: var(--font-body-style);
font-weight: var(--font-body-weight);
}
@media screen and (min-width: 750px) {
body {
font-size: 1.6rem;
}
}
{% endstyle %}
{{ 'base.css' | asset_url | stylesheet_tag }}
{%- unless settings.type_body_font.system? -%}
{%- endunless -%}
{%- unless settings.type_header_font.system? -%}
{%- endunless -%}
{%- if settings.predictive_search_enabled -%}
{%- endif -%}
{% render 'judgeme_core' %}
{% include 'scapp-customerinfo' %}
{% render 'bon-loyalty' %}
{{ "accessibility.skip_to_text" | t }}
{% section 'announcement-bar' %}
{% section 'header' %}
{% section 'footer' %}
- {{ 'accessibility.refresh_page' | t }}
{%- if settings.predictive_search_enabled -%}
{%- endif -%}
{% render 'hextom_fsb_main', product: product, customer: customer %}
{% include 'social-head-common' %}
{{ 'zifyapp-fblogin.css' | asset_url | stylesheet_tag }}
{{ 'zifyapp-fblogin.js' | asset_url | script_tag }}
TIA
Hello @harshg , I’m Richard Nguyen- CRO Expert at PageFly- Free Landing Page Builder .
As i saw that, you have So it will be like this after adding the code:
Hope it helps. Thank you and have a great day!
harshg
April 18, 2022, 8:53am
6
Hi @PageFly-Richard . Thanks for your help.
I did change the code but the issue still persists even after the change. I still have to double click on the back button to go back.