BlinkID / blinkid-in-browser

BlinkID In-browser SDK for WebAssembly-enabled browsers.
https://microblink.com/blinkid
59 stars 30 forks source link

Cached issue while loading the WASM file #57

Open pjain8889 opened 2 years ago

pjain8889 commented 2 years ago

I noticed the In-browser SDK version upgraded to 5.13.0 but not sure from today I am facing an issue in the older version(5.11.4) also. While loading the WASM file in the browser, it is cached and giving an error when uploading an image for extraction.

It is cached instead of loading: image

Error during upload a image: image

This is the code I am using : loadSettings.engineLocation = "https://unpkg.com/@microblink/blinkid-in-browser-sdk@5.11.4/resources/"; loadSettings.wasmType = BlinkIDSDK.WasmType.Basic;

Let me know what I am missing here or the issue is from the version. Please let me know as soon as possible.

Thanks, Prashant

vjekoart commented 2 years ago

Hi @pjain8889,

I'm not able to reproduce this issue.

Browser caching of the resources shouldn't be a problem if you're using exact links, e.g. loadSettings.engineLocation = "https://unpkg.com/@microblink/blinkid-in-browser-sdk@5.11.4/resources/"; instead of loadSettings.engineLocation = "https://unpkg.com/@microblink/blinkid-in-browser-sdk/resources/";. But that looks good, based on the code you provided.

Can you make sure that you're using the same version of the JavaScript SDK and WebAssembly engine?

Also, in which way are you importing/including the JavaScript SDK files?

Sincerely, Vjekoslav