cancel
Showing results for 
Search instead for 
Did you mean: 

Running/Hosting JS file in a QuickStart Site

foosetv
Champ in-the-making
Champ in-the-making
I have an issue I'm wondering if someone can point me in the right direction. I hosting a JS file (actually several) my QuickStart site Document Library and I'm making a call to it (them) in my page. I've done this because I need to make changes to this file (these files) occasionally. While this functions there seems to be an artificial delay in loading the file. On my live server somewhere between 8-21 seconds. I can verify this by bringing the file up in my browser via URL. I think it has something to do with it's Extension not being interpreted by the QuickStart site. Any other file such as HTML loads quickly and with a template.

Is there a way I can have the site display/serve this file quickly and without it being wrapped in any template code?

And just for clarification the SpacesStore address won't work for what I'm doing. I need to be able to use the WCM virtual path. Something like http://www.mysite.com/wcmqs/scripts/myscript.js
3 REPLIES 3

bremmington
Champ on-the-rise
Champ on-the-rise
I'm not certain what would cause a delay as you describe, but you can define a template that simply passes the content of the asset through fairly easily. See my reply to a related question about returning pre-rendered XML unchanged. The part that is directly relevant to you is step 3 in that post that describes how to create a "raw" template. Instead of step 4 you probably want to define a template mapping on your "scripts" section similar to "ws:article=raw" (all you JavaScript files should be of the ws:article type).

Hope that helps.

foosetv
Champ in-the-making
Champ in-the-making
I saw that post just after I made my post. It actually helped to some extent and is handy template to have. It didn't completely solve my problem but I did see some improvement. I have an overall speed issue in that anything in the WCM site loads slower than anything else on the server (which also is seeming a bit slow), there seems to be some overhead. I think it might be a database issue. I made a post in another thread on the boards here about maximum groups and user accounts.

BTW, in my opinion I think it would be beneficial if this raw template was included in the WCM package out of the box. It is pretty easy to create but I think it would be helpful to new users to include it with the other default templates. Any chance of including it in future relases?

bremmington
Champ on-the-rise
Champ on-the-rise
Yep, I can add that into the product easily. I'll get it in for the next release.

Not sure what the performance issue might be. Would be interested to hear if you get to the bottom of it. We see very good performance under test.