Implemented jQuery Migrate

In my post, My Plan to Embrace JS and Move Beyond jQuery ), I discussed embracing pure JavaScript and potentially eliminating jQuery usage altogether.

I'm still determined to reduce jQuery dependence on this site. However, I haven’t found it easy to recode everything in pure JavaScript.

Given my current workload, including other personal projects that I still have to complete, this transition will take time.

While in the mean time jQuery will have to stay...

... Did you notice the site is a lot faster now.

This update is a contribution to the load speed. I removed the older jQuery versions tags and added the jQuery migrate script.

The site used to be slower because some widgets on this site where coded in old jQuery releases like the related posts is coded in jquery version 1, the ticker is coded in version 2 and newer widgets are coded in jQuery version 3.

This is where jQuery Migrate comes in

Previously, I had to include multiple versions of jQuery (v1, v2, and v3) to ensure compatibility, which added significant load to the site.

On the jQuery website I saw the jQuery migrate script, I knew this is the package I needed and thanks to an explanation on Arlina Design’s site {you'll have to use translator on it's an indonesia site}, I was able to implement the jQuery Migrate, to streamline my jQuery usage.

Reasons to Use jQuery Migrate:

1. Compatibility:

It ensures that older jQuery code continues to function without needing multiple versions of the library. I just need the lastest jQuery script tag (version 3). jQuery Migrate will handle how other older codes becomes compatible.

2. Performance:

jQuery migrate reduces the load burden by eliminating the need for multiple jQuery versions.

3. Simplicity:

It simplifies maintenance and updates, making it easier to manage the site’s codebase.

My Future Plans:

CSS-Only Solutions:

I plan to convert tabs to CSS-only and use the HTML5 <details> and <summary> tags for collapsible sections and accordions. The menu button will also be CSS-only soon.

JavaScript Needs:

Despite these changes, JavaScript will still be necessary for features like related posts, post fetch widgets, dynamic updates, instant load and lazy load, comments, and webmentions.

This site serves as a prototype or live demo of the AllOne template.

jQuery will remain a part of the AllOne template for easy maintenance, but the solution to improve its load lies in using browser-cached jQuery loads and asynchronously loading the jQuery script tag.

Please write your comments or send a webmention

Additional Widgets

Profile Picture

S David Prince

Typically replies in minutes

Profile Picture

Hi there πŸ‘‹

Leave a message

or Chat with DeePee

Start chat with:

Explore: Navigation