logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
ray22901031  
#1 Posted : Thursday, July 7, 2022 3:03:17 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
Was not sure whether to post this under future enhancements or bug reports.

The unload event is problematic for most browsers because it messes up the bfcache. Google is starting to bark more and more when this event is used. Obviously, they recommend the pagehide event instead.

I am curious if this is something that's going to be addressed since it involves going into some AbleCommerce functionality. They are also becoming very strict on how the beforeunload event is also used.

Everything today from a Google perspective is about speed from a mobile device, using outdated events just messes up any type of optimization.

If you require additional information, please let me know, but Google has a tremendous amount regarding this. Hopefully, maybe in a next release this can be addressed and start moving some of these functions into the newer technology that is being used today and recommended by Google.

Please reach out to me if you require any additional info.

Like always, many thanks,
-Ray

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyar  
#2 Posted : Friday, July 8, 2022 2:07:51 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Hi Ray,

Thanks for pointing this out. Actually, we have added this unload event to invalidate bfcache for a specific reason.

We have a feature basket notifier (a slide container that drops from the header when an item is added to the cart).
The problem was that when a user uses the browser back/forward option, this pop-up appears again.

We can try using pageshow/pagehide events to achieve the requirement.
ray22901031  
#3 Posted : Friday, July 8, 2022 8:03:06 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
I think it might be a good idea to try to use the pagehide event instead to try to meet this requirement. Since you can do better testing on your end on how this might affect other factors, I decided not to make the change myself.

It might be a good idea to attempt to test this for a future version. Google is becoming very specific in what they're looking for and this will impact ranking.

On another note, I need to address the Canonical URL issue again. I don't think you guys understand how serious this is. And anyone who uses AbleCommerce is penalized because the homepage creates an entirely different page called default.

Now that we're undergoing even further SEO optimization, we have run various SEO tools against other AbleCommerce websites, and all these tools agree that this is not correct. You can run these tools yourself and come to the same conclusion. No one using your software benefits from this.

All the tools have the same warning "The specified canonical link points to a different page.", and because this is happening on the main index page, AbleCommerce users are going to suffer.

On my post dated 29 days ago, your recommendation was "objectURL should not be equal to "default" = (!objectUrl.Equals("Default")"

Why doesn't this work?

I'm still using " (!objectUrl.Contains("Default")))", which works perfectly as long as default is not included in any other url.

Await your feedback—thanks



Just in case you need to see the full contents of the meta-tag file. Yes I know I'm hard coding the webURL, this is intentional.

@{
string description = ViewBag.MetaDescription ?? string.Empty;
string keywords = ViewBag.MetaKeywords ?? string.Empty;
string objectUrl = ViewBag.ObjectUrl ?? string.Empty;
string webUrl = "https://www.myradiomall.com";
}

<meta http-equiv = "content-language" content = "en">

@if (!string.IsNullOrEmpty(description)) {
<meta name="description" content="@description">
}
@if (!string.IsNullOrEmpty(keywords)) {
<meta name="keywords" content="@keywords">
}
@if (!string.IsNullOrEmpty(objectUrl) && (!objectUrl.Contains("Default"))) {
<link rel="canonical" href="@objectUrl" />
}
@if (objectUrl.Contains("Default")) {
<link rel="canonical" href="@webUrl" />
}

Edited by user Friday, July 8, 2022 8:18:43 AM(UTC)  | Reason: Not specified

nadeem  
#4 Posted : Friday, July 8, 2022 1:08:18 PM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 109

Thanks: 17 times
Was thanked: 18 time(s) in 18 post(s)
Quote:
Why doesn't this work?


This will not work because the objectUrl is a full (e.g. https://www.myradiomall.com/Default) Url, not the 'Default'. If you want to apply the equal check, you can do something like this:

Code:
!objectUrl.Equals("https://www.myradiomall.com/Default")


You can also use EndsWith e.g.

Code:
!objectUrl.EndsWith("/Default")


Hope this helps!

Edited by user Friday, July 8, 2022 1:09:02 PM(UTC)  | Reason: Not specified

ray22901031  
#5 Posted : Friday, July 8, 2022 7:30:48 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
Thank you for your explanation, it makes sense and I should've figured it out on my own.

Going back to the original concern with the unload event. In your opinion, do you think changing any appearance of the "UNLOAD" event to "PAGEHIDE" would have any destructive effects with normal functions?

-Ray

Edited by user Saturday, July 9, 2022 9:18:51 AM(UTC)  | Reason: Not specified

shaharyar  
#6 Posted : Wednesday, July 13, 2022 12:43:11 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
Going back to the original concern with the unload event. In your opinion, do you think changing any appearance of the "UNLOAD" event to "PAGEHIDE" would have any destructive effects with normal functions?


It will not affect normal functions.
The only concern is that there might be an unexpected display of the Basket Notifier when using the browser back button. This will need some testing.
ray22901031  
#7 Posted : Wednesday, July 13, 2022 1:30:08 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
Thank you so much for your feedback.

We are doing a structural review for better SEO purposes. We should get to this point sometime late next month. I will do my tests, then report back.

But since this is an outdated technique, and not recommended in today's times, in might be beneficial to look for a better way to do this in a future upgrade.

Many thanks,
-Ray

Edited by user Wednesday, July 13, 2022 1:30:43 PM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.