What
The latest Virtuoso commercial and open source products default SPARQL endpoint form page uses bootstrap and loads a number of Content Delivery Network (CDN) file required for the page layout from remote locations.
Why
If the Virtuoso server and web browser run on an intranet with no external internet access, then the CDN files cannot be loaded resulting in the SPARQL endpoint form page loading slowly and the page layout being unformatted.
How
The required CDN files can be loaded locally in the Virtuoso web server root directory on the file system and referenced from there rather than remotely as follows:
-
Download the attached sparql-ui-cdn.zip file
-
Goto the
vsp
folder of your Virtuoso installation, which is the web server root directory location. -
Extract (unzip) the files (including sub-directory) of the sparql-ui-cdn.zip zip archive into the
vsp
folder, resulting in something like the following (on macOS):
De-iMac:vsp hwilliams$ pwd
/Applications/Virtuoso 8.3.app/Contents/virtuoso/vsp
De-iMac:vsp hwilliams$ ls -l cdn
total 856
-rw-r--r-- 1 hwilliams admin 83551 9 Mar 12:33 bootstrap-icons.min.css
-rw-r--r-- 1 hwilliams admin 80420 9 Mar 12:33 bootstrap.bundle.min.js
-rw-r--r-- 1 hwilliams admin 194901 9 Mar 12:33 bootstrap.min.css
drwxr-xr-x 4 hwilliams admin 128 9 Mar 12:25 fonts
-rw-r--r-- 1 hwilliams admin 72535 9 Mar 12:33 jquery.slim.min.js
De-iMac:vsp hwilliams$
- Make a Virtuoso isql connection to the database (
isql 1111
by default ) and run the following command to set the Virtuososparql-ui-cdn
registry entry to/cdn
to force Virtuoso to check that location in its web server root directory for required files ie where they have been placed locally, in step 3:
registry_set ('sparql-ui-cdn', '/cdn' );
Then force refresh the Virtuoso ~/sparql
endpoint browser page which will load the page with the correct layout immediately, without the need to restart Virtuoso.