The published WebGL project, to load assetbundle smoothly, needs to be noticed from the time of packaging
BuildPipeline.BuildAssetBundles(outPath, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.WebGL);
Be sure to note the publishing platform:
BuildTarget.WebGL
As for compression mode
BuildAssetBundleOptions.ChunkBasedCompression //LZ4BuildAssetBundleOptions.None
Either way, not the others.
When loaded, WEBGL does not support loading local, so it is customary to successfully load the local package when it is developed and cannot load the local package after publishing it as a WebGL project .
The Assetbundle resource must be uploaded to the server, loaded with the URL of the file, or with www.
As for the server, simply get an IIS, and take care to set it up.
(see: Download Assetbundle from the IIS Web site and write to the local disk for the specified path)
WebGl and Assetbundle