speedtestplugin

A simple plugin to test the network speed between user device and a server sepcified by the user by downloading the file specified by the user

Usage no npm install needed!

<script type="module">
  import speedtestplugin from 'https://cdn.skypack.dev/speedtestplugin';
</script>

README

jquery-speedtest-plugin

This is a plugin created in Jquery to display the speed in the network. A file from the user specified location is taked and it is used to measure the bandwidth between the server and the user sytem.

The plugin takes inputs like:
- fileSize
- fileType
- fileUrl
- error message
- waiting message

Description of arguments

  1. filesize

    Takes the size of the reference file in bytes. This will be the maximum size of the file That will be downloaded from the server

    The file will be downloaded and the time taken to download this file is returned as the bandwidth speed.

  2. fileType

    The file type is the extension of the file that is to be downloaded to calculate the Bandwidth speed.

    Currently handling documents and image formats.
  3. fileUrl

    This takes the url of the file location.

    Currently handling complete URL without validation
  4. error Message

    The message that needs to be displayed when the file fails to download

    This will replace all text inside the calling DOM element with the error message.

  5. Waiting Message

    The message that needs to be displayed when the user waits to for the file to download and the operations to complete

TODO

Create a fallback for all the arguments in case the user is not able to provide them in the call.

Create a function to handle upload speed check.