User_Notes

Applications notes from users' feedback

Debugging

Errors alert messages are logged, such as failures to load PGN games, incorrect PGN games or incorrect FEN strings. When an error is encountered, a chessboard square will flash to signal the exception. The error alert log can be reviewed clicking on the flashing chessboard square. For more info read these debugging notes.

Addressing potential issues with hosting PGN files

There are plenty of free hosting providers where you can host your HTML files together with all the pgn4web supporting files.

Please note that some users have reported issues with some hosting providers and PGN files (see issue 41). Some provider for instance might not allow hosting of PGN files (or, in general, only allow hosting of known file types). If you uploaded all your files correctly and still pgn4web shows an error message failing to load your PGN files, you could try renaming the PGN file with a different extension, such as .txt or anything that your hosting provider supports. Do not change the content of your PGN file, just the extension of the filename and remember to reflect the change in the SetPgnUrl statement of your HTML file.

You can easily check if this problem affects your webpage by typing the URL of your PGN file in your web browser; if the web browser is able to download the file so should the javascript code of pgn4web, so this issue would not apply to you. If your web browser cant download the file, this issue might apply to your webpage and web host.

Testing your HTML files locally

Loading of local data files with javascript is not supported by a number of browsers. As a result, local testing of HTML pages might fail when loading PGN files. Please avoid local testing and use a web server instead.

Compressing pgn4web.js code

pgn4web.js code is checked with the lint tool (see online version at http://www.javascriptlint.com/online_lint.php).

Plase note that warnings "lint warning: increment (++) and decrement (--) operators used as part of greater statement" are ignored.

Lint validation should allow for easy compression of the javascript code, for instance using http://javascriptcompressor.com/

Although a compression beyond 50% can be achieved, only the uncompressed version is distributed, but if you want to use a compressed version on your site, the pgn4web.js code should support it.


Related

Tickets: #41
Wiki: HowTo
Wiki: HowTo_Debugging
Wiki: Index

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.