WP AutoMedic

Fixes the Internet! Self-healing nanobots for your website! …or at least, automatically reloads broken images…

Author:WP Medic (profile at wordpress.org)
WordPress version required:3.0.0
WordPress version tested:5.9.3
Plugin version:1.5.3
Added to WordPress repository:29-07-2017
Last updated:22-04-2022
Rating, %:0
Rated by:0
Plugin URI:http://wpmedic.tech/wp-automedic/
Total downloads:743
Active installs:10+
plugin download
Click to start download

You spend ages to get everything working on your site, BUT then, it can still break for visitors with a slow connection or temporary connectivity problems. A single failed stylesheet load can make your site look like it is ugly or broken – or just from 1994. The only answer (until now) was the user refreshing the whole page and starting again… often only to have something else break and losing your visitor to frustration.

WP AutoMedic attempts to solve this problem by checking each resource on the page, whether it is an image or stylesheet or script, and reloading ONLY those resources that failed to load. While it won’t fix typos pointing to resources which don’t exist, it will at least try again (and as many times as you set it to) so that the webpage display can “heal itself” automatically (or rather, automedically!) in the majority of cases – mostly for slow or temporarily bad connections – without your site visitor having to hit the refresh button and start all over again!

WP AutoMedic Home
Support Forum

So what? What’s in it for me?

Well, first off, it simply means your site visitors will have a better overall experience when broken images and stylesheets etc. magically heal themselves before their eyes. They may not even notice, but they WILL notice if they DO break, and many people can too easily assume your “site is broken” or “badly designed” even if it is actually their slow or interupted network connection that is at fault! It happens far more than you think, and especially if you have a fast connection yourself, you may not have even stopped to consider if your users do. Now is the time to fix that!

Browsers have decided to ignore this common problem, but you don’t have to. Instead, having WP AutoMedic in place for your visitors increases the stickiness, friendliness and usability of your site, which basically means they stay on your site longer – which is probably what you want! – and will probably lead to an increase in real page views
and thus subscriptions and/or sales etc. etc. If that doesn’t “sell” you on the benefits of installing and using WP Automedic, that’s okay, I’m not trying – it’s free. ????

What does it actually do?

  1. Loads after the webpage says it is loaded.
  2. Checks all chosen elements for broken resources.
  3. Sets a timed cycle for each broken resource.
  4. Attempts to reload the resource on each cycle.
  5. Magically medicates and heals your webpage.

What resources does it work for?

Checking a resource is loaded and reloading it is no simple feat, and different for different page elements, and different browsers – which have different javascript functions or support – making is rather complex and time-consuming to code and test. So, I have starting with the most common page elements and am going from there. ????

Currently WP AutoMedic works for:

  • Broken Images (<img> elements) – comparitively pretty easy!
  • Broken Stylesheets (<link rel='stylesheet'> elements) – pretty tricky!
    (and yes it can check and reload stylesheets in Firefox!)

Does not currently work for:

  • initial check of external stylesheets (some workarounds possible)
  • stylesheets @imported inside inline <style> elements (possible)
  • broken image and background URLs inside stylesheets (maybe possible)

A future Pro Version may also provide for broken scripts and iframe loading…
Mostly Working (in progress) for:

  • Broken Scripts (<script src='somescript.js'> elements) – difficult!
    Not Working yet (workarounds in progress) for:
  • Broken Iframes (<iframe src='somepage.html'> elements) – near impossible!

…and ‘unowned’ iframe load checking cannot be checked in any case.

Of course other alternatives and workarounds are being explored, and suggestions and contributions are very welcome! It would be nice to improve WP AutoMedic to cover more situations and be tested and improved for different browsers.

WP AutoMedic Home
Support Forum
WP AutoMedic Home

Like this plugin? Check out more of our free plugins here:
WP Medic Tools
WordQuest Plugins

Looking for an awesome theme? Check out my child theme framework:
BioShip Child Theme Framework

Support

For support or if you have an idea to improve this plugin:
WP AutoMedic Support

Contribute

Help fund support, improvements and log priority feature requests by a gift of appreciation:
Contribute to WP AutoMedic

Development

To aid directly in development, please fork on Github and do a pull request:
WP AutoMedic on Github

Limitations

  • External stylesheets cannot be checked initially
  • Iframe loading for ‘unowned’ iframes simply cannot be checked
  • Dynamic loading method for scripts/iframes needs setAttribute support

Known Issues

  • External stylesheets must be reloaded once before they can be checked
  • Does not handle alternate stylesheet yet (rel=alternate stylesheet)
  • Iframe checking/reloading for ‘owned’ iframes is in progress
  • Dynamic load method fallback needed for IE6/IE7 (operation aborted bug)
  • Javascript snippet needed for non-Wordpress Child Iframes

Planned Updates/Features

  • frature: local cache to store external images/stylesheets for fallbacks?
  • improvement: synchronize document.domain to help same-domain iframe checking
  • improvement: reload stylesheets @imported inside <style> elements?
  • test: are broken images URLs inside stylesheet rules added to reloading?
  • feature integration: use Fallback.io script for handling script dependencies?
  • logging: admin logging and compiling of ‘complete fail’ events / occurences
  • logging: admin logging of successful resource reloads (match fail events)
  • integration: possibly reapply PrefixFree.js to reloaded stylesheets?