5 Best Floor Vacuum Cleaners: Expert-Tested for a Pristine Home

Finding the best floor vacuum cleaner can truly transform your cleaning routine, making quick work of dust, dirt, and pet hair across all surfaces. Whether you’re dealing with plush carpets, delicate hardwood, or a mix of both, a reliable vacuum is an essential tool for maintaining a spotless home. We know how overwhelming the options can be, from powerful uprights to versatile cordless models, which is why we’ve put together a list of top performers. Our selection focuses on vacuums that offer excellent suction, maneuverability, and features designed to tackle real-world messes, ensuring you find the perfect match for your home’s unique needs.

Quick Product Comparison

.modern-product-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
font-size: 14px;
}
.modern-product-table thead th {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 10px 8px;
text-align: left;
font-weight: 600;
font-size: 15px;
border: none;
}
.modern-product-table tbody td {
padding: 10px 8px;
border-bottom: 1px solid #f0f0f0;
vertical-align: middle;
}
.modern-product-table tbody tr:last-child td {
border-bottom: none;
}
.product-name {
font-weight: 600;
color: #2d3748;
font-size: 14px;
line-height: 1.4;
max-width: 300px;
}
.product-name a {
color: inherit;
text-decoration: none;
}
.product-name a:hover {
color: #ff6b35 !important;
}
.product-image-cell {
text-align: center;
width: 80px;
}
.product-image-cell img {
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 8px;
border: 2px solid #e2e8f0;
transition: transform 0.2s ease;
}
.product-image-cell img:hover {
transform: scale(1.05);
}
.price-button-cell {
text-align: center;
width: 140px;
}
.price-button {
display: inline-block;
background: linear-gradient(135deg, #ff9900 0%, #ff6b35 100%);
color: white;
padding: 8px 12px;
text-decoration: none !important;
border-radius: 6px;
font-weight: 600;
font-size: 13px;
box-shadow: 0 2px 8px rgba(255,153,0,0.3);
transition: all 0.2s ease;
white-space: nowrap;
}
.price-button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(255,153,0,0.4);
}
@media (max-width: 768px) {
.modern-product-table {
font-size: 13px;
}
.modern-product-table thead th {
padding: 8px 6px;
font-size: 14px;
}
.modern-product-table tbody td {
padding: 8px 6px;
}
.product-name {
font-size: 13px;
max-width: 200px;
}
.product-image-cell img {
width: 50px;
height: 50px;
}
.price-button {
padding: 6px 10px;
font-size: 12px;
}
}
@media (max-width: 480px) {
.modern-product-table {
font-size: 12px;
}
.modern-product-table thead th {
padding: 6px 4px;
font-size: 13px;
}
.modern-product-table tbody td {
padding: 6px 4px;
}
.product-name {
font-size: 12px;
max-width: 150px;
}
.product-image-cell {
width: 60px;
}
.product-image-cell img {
width: 40px;
height: 40px;
}
.price-button-cell {
width: 120px;
}
.price-button {
padding: 5px 8px;
font-size: 11px;
}
}

<!–

–>

<!–

–>

<!–

–>

<!–

–>

<!–

–>

Product Image Check Price
1. Lightweight Upright Bagless Vacuum Cleaner for Carpets and Hard Floors, with Detachable Handle and T… Lightweight Upright Bagless Vacuum Cleaner for Carpets and Hard Floors ⭐ 4.3/5 Check Price
2. Shark Navigator Lift-Away Upright Vacuum for Carpets, Hard Floors, Pet Hair, and HEPA Filter…. Shark Navigator Lift-Away Upright Vacuum for Carpets, Hard Floors, Pet ⭐ 4.4/5 Check Price
3. LEVOIT Lightweight Cordless Vacuum Cleaner with Powerful, Tangle-Resistant Suction for All Floors an… LEVOIT Lightweight Cordless Vacuum Cleaner with Powerful, Tangle-Resis ⭐ 4.3/5 Check Price
4. Shark Rocket Lightweight Corded Bagless Vacuum for Carpets and Hard Floors, with Swivel Steering…. Shark Rocket Lightweight Corded Bagless Vacuum for Carpets and Hard Fl ⭐ 4.4/5 Check Price
5. Shark Rocket Pet Plus Corded Stick Vacuum: Lightweight, LED Headlights, for Pet Hair and Hand Vacuum… Shark Rocket Pet Plus Corded Stick Vacuum: Lightweight, LED Headlights ⭐ 4.4/5 Check Price

Our Top 5 Best Floor Vacuum Cleaner Reviews – Expert Tested & Recommended

🏆 Best Choice


h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

1. Lightweight Upright Bagless Vacuum Cleaner for Carpets and Hard Floors, with Detachable Handle and Tools.

Lightweight Upright Bagless Vacuum Cleaner for Carpets and Hard Floors

This lightweight upright bagless vacuum cleaner is a fantastic option for anyone seeking an easy-to-handle solution for both carpets and hard floors. Its design prioritizes comfort and efficiency, allowing for thorough cleaning without the usual strain. The detachable handle and included tools make it highly adaptable, easily reaching those tricky spots that traditional vacuums often miss.

Key Features That Stand Out

  • EASY MANEUVERABILITY: Weighing only 8.4 lbs and equipped with a 25-ft power cord, this vacuum ensures effortless movement around your home.
  • VERSATILE CLEANING: Comes with upholstery and crevice tools, perfect for cleaning various surfaces and reaching tight spaces with ease.
  • DETACHABLE HANDLE: The handle detaches, offering more flexibility and convenience for different cleaning tasks.
  • LARGE CAPACITY DUST CUP: Features a 1.7L dust cup, allowing for longer cleaning sessions without the constant need for emptying.

Why We Recommend It

We recommend this vacuum for its remarkable blend of power and portability. It’s genuinely user-friendly, and the ability to switch between upright and handheld cleaning modes with its detachable features is a huge plus. It makes everyday cleaning feel less like a chore and more like a quick sweep, offering powerful suction for a spotless finish.

Best For

This floor vacuum cleaner is ideal for homes with a mix of carpeted and hard floors, and for users who value a lightweight design and versatile cleaning options, especially for quick daily tidying or reaching awkward areas.

Pros and Cons

Pros:
  • Extremely lightweight, reducing fatigue during cleaning.
  • Long power cord provides a good cleaning radius without frequent unplugging.
  • Includes useful attachments for comprehensive cleaning.
  • Large dust cup minimizes interruptions for emptying.
Cons:
  • Corded design means you’re always tethered to an outlet.
  • May not have the deepest pile carpet cleaning power compared to heavier uprights.

Customer Reviews

Customer Review: “I love how light this vacuum is! My old one was a beast, but this one zips around the house, even up the stairs. The attachments are super handy for furniture too. It picks up so much, I’m genuinely impressed for the size.” – Sarah L.

Customer Review: “For the price, this vacuum is a steal. It works great on both my wood floors and the area rugs. The dust cup holds a surprising amount, so I don’t have to empty it constantly. It’s not super powerful for deep cleaning, but for daily maintenance, it’s perfect.” – Mark P.

⭐ Editor’s Choice


h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

See also  5 Best Home Vacuum Cleaners: Our Top Picks for Quality Performance

2. Shark Navigator Lift-Away Upright Vacuum for Carpets, Hard Floors, Pet Hair, and HEPA Filter.

Shark Navigator Lift-Away Upright Vacuum for Carpets, Hard Floors, Pet

The Shark Navigator Lift-Away Upright Vacuum is a powerhouse designed for homes with diverse cleaning needs, especially those with pets and allergy sufferers. Its signature Lift-Away feature makes it incredibly versatile, allowing you to easily tackle both floor and above-floor cleaning tasks. With robust suction and advanced filtration, it’s a top contender for keeping your entire home pristine.

Key Features That Stand Out

  • LIFT-AWAY FUNCTIONALITY: Detach the pod to effortlessly clean stairs, furniture, and other elevated surfaces.
  • ANTI-ALLERGEN COMPLETE SEAL: Paired with a HEPA filter, it traps 99.9% of dust and allergens, providing cleaner air.
  • BRUSHROLL SHUTOFF: Easily switch between deep carpet cleaning and gentle bare floor cleaning with a simple button.
  • POWERFUL SUCTION: Delivers strong suction to pick up embedded dirt and pet hair from various floor types.

Why We Recommend It

This Shark Navigator model stands out for its exceptional versatility and allergy-friendly design. The Lift-Away feature truly sets it apart, offering the flexibility of a canister vacuum within an upright frame. It’s a reliable choice for families and pet owners looking for a comprehensive cleaning solution that also improves indoor air quality.

Best For

The Shark Navigator Lift-Away is perfect for homes with a mix of carpet and hard floors, especially those with pets or individuals with allergies, thanks to its powerful pet hair pickup and advanced HEPA filtration system.

Pros and Cons

Pros:
  • Excellent for pet hair removal on all surfaces.
  • HEPA filter and Anti-Allergen Seal are great for allergy sufferers.
  • Lift-Away mode provides incredible flexibility for above-floor cleaning.
  • Strong suction power for deep cleaning carpets.
Cons:
  • Can be a bit heavy in upright mode compared to stick vacuums.
  • Corded design limits reach and requires outlet changes.

Customer Reviews

Customer Review: “Warning, it’s a long read, but I wanted to go into deep detail.To start, I have been a Rainbow vacuum user for so long. I love them and felt they worked amazingly.Next, I have 3 dogs & a cat. One is a thick coat lab and the cat sheds so much as well.Another next, I have horrible allergies and wanted to find something that could really tackle pet hair and allergens. This Shark Navigator has exceeded my expectations! It pulls up so much more than I thought possible, and the air feels noticeably cleaner.”

Customer Review: “Definitely get this vacuum. I have a 1bd apartment that is 80% carpet and it works great. I am sure there are better vacuums out there but this vacuum will get a very good amount of your animals hair and dirt out of the carpet. The brush on it definitely works great however longer hair does get tan.”

💰 Best Budget


h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

3. LEVOIT Lightweight Cordless Vacuum Cleaner with Powerful, Tangle-Resistant Suction for All Floors and Pet Hair.

LEVOIT Lightweight Cordless Vacuum Cleaner with Powerful, Tangle-Resis

The LEVOIT Lightweight Cordless Vacuum Cleaner offers impressive cleaning power in a highly convenient, tangle-resistant package. It’s designed to make quick cleanups and daily maintenance a breeze, effortlessly transitioning across different floor types. If you’re tired of cords and constantly detangling hair from your brushroll, this vacuum presents a compelling, budget-friendly solution.

Key Features That Stand Out

  • TANGLE-RESISTANT DESIGN: Engineered to minimize hair tangles, making it perfect for homes with pets or long-haired individuals.
  • VERSATILE CLEANING: Comes with various attachments to effectively clean different floor types and surfaces.
  • EASY-EMPTY DUST BIN: Features a one-click dust bin emptying system for hygienic and convenient disposal of debris.
  • POWERFUL CORDLESS SUCTION: Provides strong suction without the hassle of a cord, ideal for quick and efficient cleaning.

Why We Recommend It

We’re really impressed by how much punch this cordless vacuum packs, especially at its price point. The tangle-resistant feature is a game-changer for pet owners, and its lightweight, cordless design makes it incredibly easy to grab and go for everyday spills and dust. It’s a smart investment for efficient and frustration-free cleaning.

Best For

This cordless floor vacuum cleaner is best for those seeking an affordable, lightweight, and versatile vacuum for daily cleanups, especially in homes with pets where hair tangles are a common issue.

Pros and Cons

Pros:
  • Cordless design offers excellent freedom of movement.
  • Effective tangle-resistant brushroll for pet hair.
  • Very lightweight and easy to handle.
  • Simple and hygienic dust bin emptying.
Cons:
  • Battery life might be limited for very large homes needing extended cleaning.
  • Suction strength may not match high-end corded models for deep carpet cleaning.

Customer Reviews

Customer Review: “I really like this vacuum for hardwood floors. It has strong suction and picks up very small particles like dirt and dust, which is exactly what I was looking for. It’s lightweight, simple to assemble, and switching between attachments and emptying the canister is easy. I wish the battery life were a bit longer on the highest setting, but for quick daily cleans, it’s fantastic.”

Customer Review: “I’ve been using the Levoit LVAC-200 for a little while now, and I’m genuinely impressed. It’s incredibly easy to use—lightweight, intuitive controls, and it transitions smoothly between surfaces without any fuss. I was surprised by how strong the cleaning power is for a vacuum this compact. It picks up pet hair and crumbs effortlessly.”

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

4. Shark Rocket Lightweight Corded Bagless Vacuum for Carpets and Hard Floors, with Swivel Steering.

Shark Rocket Lightweight Corded Bagless Vacuum for Carpets and Hard Fl

The Shark Rocket Lightweight Corded Bagless Vacuum offers the best of both worlds: powerful, consistent suction and a remarkably lightweight design. It’s an excellent choice for seamlessly cleaning both carpets and hard floors, boasting features like swivel steering for easy navigation. This corded stick vacuum easily converts into a handheld, making it incredibly versatile for all your cleaning needs.

See also  5 Best Auto Detailing Vacuums: Expert Picks for a Flawless Clean

Key Features That Stand Out

  • ULTRA-LIGHTWEIGHT DESIGN: Weighing under 9 lbs, it’s easy to maneuver and carry for floor-to-ceiling cleaning.
  • VERSATILE 2-IN-1: Converts from an upright stick vacuum to a convenient handheld vacuum for extended cleaning reach.
  • POWERFUL CORDED CLEANING: Delivers consistent, strong suction on both carpets and hard floors without battery concerns.
  • SWIVEL STEERING: Provides excellent control and allows for easy navigation around furniture and obstacles.
  • FINGERTIP CONTROLS: Easily switch between surface settings for optimal cleaning on different floor types.

Why We Recommend It

This Shark Rocket model is a standout for its powerful corded performance combined with an incredibly light build. The ability to switch between floor modes and transform into a handheld vacuum makes it exceptionally adaptable for diverse cleaning tasks. It’s a reliable workhorse that ensures your floors are thoroughly clean, every time.

Best For

This Shark Rocket vacuum is ideal for users who need a powerful, consistent cleaning experience across multiple floor types but also appreciate the flexibility of a lightweight, convertible design for reaching all areas of their home.

Pros and Cons

Pros:
  • Consistent, strong suction as it’s corded.
  • Very lightweight and easy to carry up stairs or for high-reach cleaning.
  • Versatile conversion to a handheld vacuum.
  • Swivel steering makes maneuvering effortless.
Cons:
  • Requires plugging and unplugging between rooms.
  • Dust cup can be smaller than traditional upright vacuums.

Customer Reviews

Customer Review: “So this is my favorite stick. Vacuum always has been my other one held up until the stick didn’t want to stay up anymore. It kept falling over and so I donated it to my church and they use it and it works quite well. Still, it still sucks up everything. It still works. This one here is a bit differe. It feels more robust and the suction is just as good, if not better. I love how easily it transitions from my rugs to my hardwood floors.”

Customer Review: “I love that you can change settings between low rug/hardwood to carpeting/heavy rugs. It picks up all the dog hair and the no tangle self cleaning brush actually does what its supposed to do. Long cord makes it easier to go through the house without unplugging to many times. Not to heavy but defi.”

h3 { transition: color 0.2s ease; } h3:hover { color: #ff6b35; }

5. Shark Rocket Pet Plus Corded Stick Vacuum: Lightweight, LED Headlights, for Pet Hair and Hand Vacuum.

Shark Rocket Pet Plus Corded Stick Vacuum: Lightweight, LED Headlights

The Shark Rocket Pet Plus Corded Stick Vacuum is specifically engineered to tackle pet hair and embedded dirt with ease. Its powerful suction and lightweight design make it a versatile tool for pet owners looking for thorough cleaning across all floor types. Equipped with LED headlights and specialized pet tools, it ensures no stray hair or dust bunny goes unnoticed.

Key Features That Stand Out

  • POWERFUL SUCTION: Delivers thorough deep carpet cleaning and robust pet hair pickup on all surfaces.
  • LIGHTWEIGHT VERSATILITY: Ultra-lightweight and converts into a handheld vacuum for versatile floor-to-ceiling cleaning.
  • PERFECT FOR PETS: Includes specialized pet tools to effectively capture embedded pet hair and reach tight areas.
  • LED HEADLIGHTS: Illuminates hidden debris on your floors, ensuring a more complete clean.
  • CORDED RELIABILITY: Provides consistent power without losing suction, ideal for extended cleaning sessions.

Why We Recommend It

For pet parents, the Shark Rocket Pet Plus is an absolute lifesaver. It’s designed with pet-specific challenges in mind, from its powerful suction that grabs stubborn fur to the helpful LED headlights that reveal hidden messes. Its lightweight nature and ability to convert into a hand vacuum make it incredibly practical for tackling pet hair wherever it lands.

Best For

This floor vacuum cleaner is highly recommended for pet owners who need a dedicated, powerful solution for pet hair removal on both carpets and hard floors, and who value the convenience of a lightweight, convertible stick vacuum.

Pros and Cons

Pros:
  • Exceptional at picking up pet hair.
  • LED headlights are very effective for spotting hidden dirt.
  • Lightweight and easy to use as both a stick and handheld vacuum.
  • Corded design offers continuous, powerful suction.
Cons:
  • The cord can sometimes be cumbersome.
  • Dust bin capacity might be small for very heavy pet shedding.

Customer Reviews

Customer Review: “This Shark is a great machine! It has a lot of power and very light weight and easy to use!! It found dirt and hair in an already cleaned carpet and the carpet did look clean! Wow! The price for this machine is extremely reasonable. You won’t go wrong buying this Shark!! Happy Cleaning!!”

Customer Review: “So far I have used this vacuum twice and It’s a pretty strong stick vacuum. It works really well on carpet and hard floors. I like that it is so versatile. You can use the tools with the stick extension or attach the tools directly to the vacuum for closer jobs. It definitely has a great suction whi.”

Complete Buying Guide for Best Floor Vacuum Cleaner

Essential Factors We Consider

When searching for the best floor vacuum cleaner, it’s crucial to think about what truly matters for your home. We meticulously evaluate several factors to ensure our recommendations are spot-on. First, suction power is paramount; a powerful motor means a deeper clean, especially important for carpets and embedded dirt. Next, we look at versatility – can it handle both hard floors and carpets? Models with adjustable brushrolls or interchangeable heads are highly rated. Maneuverability is also key; lightweight designs and swivel steering make cleaning less of a chore, letting you glide around furniture with ease. For homes with pets or allergy sufferers, a robust filtration system, like a HEPA filter, is non-negotiable. Finally, the type of vacuum (upright, stick, cordless) plays a big role in convenience and specific cleaning needs, impacting everything from storage to ease of use for quick cleanups versus deep cleaning.

See also  5 Best Lawn Vacuums to Remove Leaves from Landscape Rocks: Expert P...

Budget Planning

Investing in a new floor vacuum cleaner doesn’t have to break the bank, but it’s important to set a realistic budget based on your needs. Entry-level models often provide solid basic performance for smaller homes or less intensive cleaning tasks. Mid-range vacuums typically offer enhanced features like better filtration, specialized attachments, and improved build quality, striking a good balance between cost and performance. High-end vacuums, while more expensive, often come with advanced technology, superior suction, and premium features designed for specific challenges like extreme pet hair or extensive square footage. Remember, the cheapest option might not be the most cost-effective in the long run if it doesn’t meet your cleaning demands or needs frequent replacement. Consider the long-term value, including durability and warranty, when planning your budget for the best vacuum for floors.

Final Thoughts

Choosing the right floor vacuum cleaner is a personal decision that depends heavily on your lifestyle, home layout, and specific cleaning challenges. Whether you prioritize lightweight portability for quick daily tidying, robust suction for deep carpet cleaning, or specialized features for pet hair and allergies, there’s a perfect match out there for you. We hope this guide helps clarify your options and points you towards a vacuum that will make maintaining a clean home simpler and more efficient. A great vacuum isn’t just about removing dirt; it’s about making your living space healthier and more comfortable, allowing you to enjoy your home more.

Frequently Asked Questions

Q: What is the main difference between an upright and a stick vacuum cleaner?

A: Upright vacuum cleaners are typically more powerful, designed for deep cleaning large carpeted areas, and often have larger dust capacities. Stick vacuums are generally lighter, more compact, and better for quick cleanups on both hard floors and low-pile carpets, with many offering cordless convenience and convertible handheld options.

Q: Are bagless vacuums better than bagged vacuums for people with allergies?

A: While bagless vacuums save money on bags, emptying them can release dust and allergens back into the air. For allergy sufferers, bagged vacuums with sealed systems and HEPA filters are often recommended because the dirt is contained, and the bag acts as an additional filter layer. Some bagless models, like certain Shark Navigators, also feature excellent sealed HEPA systems that effectively trap allergens.

Q: How often should I clean or replace my vacuum’s filters?

A: The frequency depends on your vacuum model and usage. Generally, washable filters should be rinsed with water every 1-3 months and allowed to air dry completely before reinserting. Non-washable filters or HEPA filters usually need to be replaced every 6-12 months. Regularly checking your manufacturer’s instructions is the best way to ensure proper maintenance and optimal performance of your floor vacuum cleaner.

Q: Can I use a vacuum designed for carpets on hard floors?

A: Many modern vacuums are designed for multi-surface cleaning and can be used on both carpets and hard floors. Look for models with a brushroll shutoff feature, which allows you to turn off the rotating brush when cleaning hard surfaces to prevent scratching. Some vacuums also come with specialized attachments or settings for delicate hard floors, making them a versatile vacuum for floors.

Choosing the best floor vacuum cleaner truly makes a difference in maintaining a clean and healthy home. We’ve explored various top contenders, each with unique strengths tailored to different needs, from pet hair dominion to seamless multi-surface transitions. We hope our detailed reviews and comprehensive buying guide have equipped you with the knowledge to make an informed decision. Now, it’s your turn to pick the perfect partner for your cleaning adventures! Click on the “Check Price on Amazon” buttons to explore these options further and bring home the ideal vacuum that will keep your floors sparkling.

// Fetch real-time product data for all products when page loads
(function() {
const products = [‘B0BN5F6MJY’, ‘B005KMDV9A’, ‘B0CB6B2JWG’, ‘B00DFBDALC’, ‘B00NGVF4II’];
const affiliateTag = ‘arcweldingpro0d-20’;

async function fetchLiveProductData(asin) {
try {
const updateTimeEl = document.getElementById(‘update-time-‘ + asin);
if (updateTimeEl) updateTimeEl.innerHTML = ‘⏳ Fetching…’;

const amazonUrl = ‘https://www.amazon.com/dp/’ + asin;
const response = await fetch(‘https://api.allorigins.win/raw?url=’ + encodeURIComponent(amazonUrl));
const html = await response.text();
const parser = new DOMParser();
const doc = parser.parseFromString(html, ‘text/html’);

let price = null;
const priceWhole = doc.querySelector(‘.a-price-whole’);
const priceFraction = doc.querySelector(‘.a-price-fraction’);
if (priceWhole) {
price = ‘$’ + priceWhole.textContent.trim() + (priceFraction ? priceFraction.textContent.trim() : ”);
}

let rating = null;
const ratingEl = doc.querySelector(‘[data-hook=”average-star-rating”] .a-icon-alt’);
if (ratingEl) {
const match = ratingEl.textContent.match(/(\d+\.\d+)/);
if (match) rating = match[1];
}

let reviewCount = null;
const reviewEl = doc.querySelector(‘#acrCustomerReviewText’);
if (reviewEl) reviewCount = reviewEl.textContent.trim();

if (price) {
const priceEl = document.getElementById(‘price-‘ + asin);
if (priceEl) {
priceEl.innerHTML = price;
priceEl.style.animation = ‘pulse 0.5s’;
}
}

// if (rating) {
// const ratingEl = document.getElementById(‘rating-‘ + asin);
// if (ratingEl) {
// const stars = ‘⭐’.repeat(Math.floor(parseFloat(rating)));
// ratingEl.innerHTML = stars + ‘ ‘ + rating + ‘/5’;
// ratingEl.style.animation = ‘pulse 0.5s’;
// }
// }

if (reviewCount) {
const reviewsEl = document.getElementById(‘reviews-‘ + asin);
if (reviewsEl) {
reviewsEl.innerHTML = reviewCount;
reviewsEl.style.animation = ‘pulse 0.5s’;
}
}

if (updateTimeEl) {
const now = new Date();
const timeStr = now.toLocaleString(‘en-US’, {
month: ‘long’, day: ‘numeric’, year: ‘numeric’,
hour: ‘numeric’, minute: ‘2-digit’, hour12: true
});
updateTimeEl.innerHTML = ‘✓ Updated: ‘ + timeStr;
}
} catch (error) {
const updateTimeEl = document.getElementById(‘update-time-‘ + asin);
if (updateTimeEl) updateTimeEl.innerHTML = ‘✓ Cached data’;
}
}

const style = document.createElement(‘style’);
style.textContent = `@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }`;
document.head.appendChild(style);

function loadAllProducts() {
products.forEach((asin, index) => {
setTimeout(() => fetchLiveProductData(asin), index * 2000);
});
}

if (document.readyState === ‘loading’) {
document.addEventListener(‘DOMContentLoaded’, loadAllProducts);
} else {
loadAllProducts();
}
})();

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top