home
features
quick start
download
documentation
thymol files
configuration
message resources
control parameters
expression objects
thymol types
thymol API
thymol extensions
examples
sessions
say-hello
stsm example
with-dialect
extrathyme
petclinic
news
credits
user forum
issues
browser constraints
other known issues
create new issue
thymeleaf

thymoljs

browser constraints

Thymol was originally intended for use in a static (non web container) environment, because of this, by default it uses "file://" protocol URIs to access templates.

In local file system based developments, the accessibility of referenced templates is subject to the constraints imposed by the JavaScript host within which Thymol is being executed, this is normally a web-browser.

To view Thymeleaf templates loaded from the file system your browser must be configured to allow access to local (file-store) files.

firefox

To configure firefox so that it relaxes the strict "same origin" policy, open firefox and type "about:config" into the address bar, proceed to the preference setting facility and locate the "security.fileuri.strict_origin_policy" parameter. You need to set the value of this flag to "false".

chrome

The simplest way to enable local file access is to add the "allow-file-access-from-files" command line parameter to your Chrome start-up command:

      <path-to-chrome-home>chrome.exe --allow-file-access-from-files

include/substituteby

You cannot use th:substituteby to replace the content of the head element of an html file using the Chrome browser, if possible, use th:include instead.

internet explorer

Local file access is enabled by default by Internet Explorer

There are serious problems with Internet Explorer 11 local file loading using the JQuery 2.1 XHR implementation. You are strongly advised to use JQuery 1.11 until these problems are resolved.

You may also find that you need to apply "disable XSS filter" to your IE11 configuration.

safari, opera etc..

Thymol 2.0 is not tested with recent versions of Safari or Opera. Older versions have worked without problems and no issues have (so far) been raised by users of newer releases.

web server

None of these restrictions apply to files served via http, so if you're running into too many problems in a file-system based development you may consider deploying your templates and JavaScript files on a web server.