Opened 14 years ago

Closed 14 years ago

#2231 closed enhancement (wontfix)

If Debug mode is on, do an HTTP HEAD to make sure Dojo Storage/Dojo Flash's necessary resources are present

Reported by: bradneuberg Owned by: bradneuberg
Priority: high Milestone: 1.0
Component: Storage/Flash Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:


A common bug when working with Dojo Storage is to not have the important SWF files available on your web server, which are needed. This can be an evil bug, because things just silently fail. This can happen because someone just copies the dojo.js file to their web server or code directory, forgetting these files. As a defensive programming technique to aid external users of the API, if debug mode is on, do a silent XHR request in the background (A HEAD request, possible a GET on Safari since I don't think it supports HEAD...) to make sure all these resources are available (including the FileStorageProvider? resources?). If they are missing, throw an exception and print a programming error message telling the developer they need to have these be present.

Maybe add a new method to the StorageProvider? parent class, such as confirmResourcesPresent() or something, that is only called if debug mode is on and which each kind of storage provider can run to make sure its external resources are available to help developers.

Doing this will eliminate a common issue external users of Dojo Storage have run into, improving their productivity.

Change History (3)

comment:1 Changed 14 years ago by bradneuberg

Type: defectenhancement

comment:2 Changed 14 years ago by dylan

Milestone: 0.91.0

comment:3 Changed 14 years ago by bradneuberg

Resolution: wontfix
Status: newclosed

This will just bloat the code and really isn't that useful. It was an idea of mine that I thought would help productivity but I don't have the bandwidth to do it for Dojo Flash.

Note: See TracTickets for help on using tickets.