Jim,
Does this method bypasses the browser's cache?
In other words, if one visits site X containing this code multiple times, does the browser use its cache to serve the file?
thanks, jld.
Jim Wilson wrote:
If you want to be really slick about it, you could try adding the following to the article [[MediaWiki:Common.js]]
(function(){ var s = document.createElement('script'); s.src = "http://path/to/external/file.js"; document.getElementsByTagName('head')[0].appendChild(s); })();
This will dynamically create the equivalent of this:
<script src="http://path/to/external/file.js"></script>
To your the document head.
-- Jim R. Wilson (jimbojw)
On 8/30/07, Jim Hu jimhu@tamu.edu wrote:
Use Mediawiki:Common.js on your wiki
On Aug 30, 2007, at 5:13 AM, Michael Heyder wrote:
Hi,
is there a way to integrate an additional js-file without editing the header.
A look at for example the category-extension a special js-file is stored in the extension folder. But how is this integrated in the wiki?
regards mic
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l