Re: IT IS TOTALLY possible to skip js with cfif
On Fri, Dec 19, 2008 at 12:08 PM, s. isaac dealey wrote: > It also depends upon your web server. The settings are primarily in the > webserver config, so Apache and IIS handle it differently. There was > something extra that needs to be done with an XML file in ColdFusion now > that it's on J2EE, but I don't remember what. Change the servlet-mapping? Here is a how-to: http://tinyurl.com/33xabk "Better" may be to use a URL rewrite engine, so you can really tweak what gets processed by what, plus, future upgrades for CF are easier. -- Literary imagination is an aesthetic object offered by a writer to a lover of books. Gaston Bachelard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317006 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: IT IS TOTALLY possible to skip js with cfif
Ian, You did shed a light. I appreciate it. Thanks, Ravi Gehlot Ian Skinner wrote: > Ravi Gehlot wrote: > >> Ian, >> >> Excellent explanation. You could not have been more clear. However, >> can you provide me with instructions in how to accomplish this? So CF >> will process the request and spit HTML with a html extension? >> >> Thanks, Ravi. >> > > Sorry, not me personally. I have never actually had the need to do > this. I have just read about it and keep the possibility in the back of > my mind if the need should ever arise. I know there are Adobe knowledge > base and blog articles out there that lay out the process. That is > where I have read about it in the past. It is a bit more involved in > the Java based MX versions of ColdFusion then it was back in the pre-MX > days. A few more settings that need to be tweaked to tell the web > server to pass the desired files to ColdFusion and to have ColdFusion > understand that it is supposed to do something with such files. > > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317004 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IT IS TOTALLY possible to skip js with cfif
> Ravi Gehlot wrote: > > Ian, > > > > Excellent explanation. You could not have been more clear. > However, > can you provide me with instructions in how to accomplish > this? So CF > will process the request and spit HTML with a html > extension? > > > Thanks, Ravi. > > Sorry, not me personally. I have never actually had the need to do > this. I have just read about it and keep the possibility in the back > of my mind if the need should ever arise. I know there are Adobe > knowledge base and blog articles out there that lay out the process. > That is where I have read about it in the past. It is a bit more > involved in the Java based MX versions of ColdFusion then it was back > in the pre-MX days. A few more settings that need to be tweaked to > tell the web server to pass the desired files to ColdFusion and to > have ColdFusion understand that it is supposed to do something with > such files. It also depends upon your web server. The settings are primarily in the webserver config, so Apache and IIS handle it differently. There was something extra that needs to be done with an XML file in ColdFusion now that it's on J2EE, but I don't remember what. -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 781.769.0723 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316990 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IT IS TOTALLY possible to skip js with cfif
Ravi Gehlot wrote: > Ian, > > Excellent explanation. You could not have been more clear. However, > can you provide me with instructions in how to accomplish this? So CF > will process the request and spit HTML with a html extension? > > Thanks, Ravi. Sorry, not me personally. I have never actually had the need to do this. I have just read about it and keep the possibility in the back of my mind if the need should ever arise. I know there are Adobe knowledge base and blog articles out there that lay out the process. That is where I have read about it in the past. It is a bit more involved in the Java based MX versions of ColdFusion then it was back in the pre-MX days. A few more settings that need to be tweaked to tell the web server to pass the desired files to ColdFusion and to have ColdFusion understand that it is supposed to do something with such files. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316987 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IT IS TOTALLY possible to skip js with cfif
Ian, Excellent explanation. You could not have been more clear. However, can you provide me with instructions in how to accomplish this? So CF will process the request and spit HTML with a html extension? Thanks, Ravi. Ian Skinner wrote: > Ravi Gehlot wrote: > >> Hello, >> >> I didn't follow this thread closely. But I am curious as to what you >> guys were discussing. How would I customize my webserver settings so >> that .js files are parsed by CF and why would I want to do that? I know >> that JS files are only text files and as far as I know there aren't any >> special settings to parse it. >> > > It is possible to configure the web server and the ColdFusion > application server to pass *any* file to ColdFusion for processing other > then the default normal, cfm, cfc, cfr, etc file extensions. This is > sometimes done so that ColdFusion processes normal htm|html files, > usually for server obscurification, i.e. to hide that the server is > making use of ColdFusion. It can also be done to preserve established > links to an older html site that is converted to cfml. > > It would be rather unusual to do this for JavaScript files, but it is > technically possible. The benefit is that you could have linked > JavaScript files dynamically built with CFML. The downside is that it > interferes with normal browser caching of linked script and|or style > files, the same thing can be done with CSS files. Sometimes it is worth > the trade off and|or there are ways to mitigate the downside with > etc. > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316985 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: IT IS TOTALLY possible to skip js with cfif
Claude Schneegans wrote: > As you said earlier, it is always possible to have the client request > for a .cfm file as a javascript file, > then you have the same advantage and downside, but only when necessary. That is true, and the way I would normally do it. But I will point out something I recently read that said that some client virus protection packages may prevent requests for script files that do not end in normal extensions. As my work is corporate, intranet based applications, this is not much of a concern, but could be for an application meant for general consumption. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316981 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: IT IS TOTALLY possible to skip js with cfif
>>The benefit is that you could have linked JavaScript files dynamically built with CFML. The downside is that it interferes with normal browser caching of linked script and|or style files, Exact. This is why it is not advisable to pass systematically ALL js files to CF. As you said earlier, it is always possible to have the client request for a .cfm file as a javascript file, then you have the same advantage and downside, but only when necessary. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316978 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IT IS TOTALLY possible to skip js with cfif
Ravi Gehlot wrote: > Hello, > > I didn't follow this thread closely. But I am curious as to what you > guys were discussing. How would I customize my webserver settings so > that .js files are parsed by CF and why would I want to do that? I know > that JS files are only text files and as far as I know there aren't any > special settings to parse it. It is possible to configure the web server and the ColdFusion application server to pass *any* file to ColdFusion for processing other then the default normal, cfm, cfc, cfr, etc file extensions. This is sometimes done so that ColdFusion processes normal htm|html files, usually for server obscurification, i.e. to hide that the server is making use of ColdFusion. It can also be done to preserve established links to an older html site that is converted to cfml. It would be rather unusual to do this for JavaScript files, but it is technically possible. The benefit is that you could have linked JavaScript files dynamically built with CFML. The downside is that it interferes with normal browser caching of linked script and|or style files, the same thing can be done with CSS files. Sometimes it is worth the trade off and|or there are ways to mitigate the downside with etc. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316971 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IT IS TOTALLY possible to skip js with cfif
Hello, I didn't follow this thread closely. But I am curious as to what you guys were discussing. How would I customize my webserver settings so that .js files are parsed by CF and why would I want to do that? I know that JS files are only text files and as far as I know there aren't any special settings to parse it. Ravi Gehlot. Robert Harrison wrote: >> You cannot do it if you have the script in a .js file. >> >>> Not with a default install... You can do that however if you customize >>> > your webserver settings so that .js files are parsed by CF. > > That's interesting. I didn't know that, but I'm still not sure I'd want to > do that. Seems like there might be some performance issues having CF parse > all the .js files. > > Robert B. Harrison > Director of Interactive services > Austin & Williams > 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 > T : 631.231.6600 Ext. 119 > F : 631.434.7022 > www.austin-williams.com > > Great advertising can't be either/or... It must be &. > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316967 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: IT IS TOTALLY possible to skip js with cfif
> You cannot do it if you have the script in a .js file. >> Not with a default install... You can do that however if you customize your webserver settings so that .js files are parsed by CF. That's interesting. I didn't know that, but I'm still not sure I'd want to do that. Seems like there might be some performance issues having CF parse all the .js files. Robert B. Harrison Director of Interactive services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be &. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316896 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: IT IS TOTALLY possible to skip js with cfif
Thanks for the info, guys! Rick > -Original Message- > From: Ian Skinner [mailto:h...@ilsweb.com] > Sent: Wednesday, December 17, 2008 5:27 PM > To: cf-talk > Subject: Re: IT IS TOTALLY possible to skip js with cfif > > s. isaac dealey wrote: > > Not with a default install... You can do that however if you customize > > your webserver settings so that .js files are parsed by CF. For a long > > time I'd considered creating my own site using .ike files. I never have > > though. ;) > > You are also not required to name your linked JavaScript files with the > '.js' extension. There is nothing preventing one from doing something > like. . And then put your CFML > built JavaScript code in the "myJavaScript.cfm" file. This will most > likely confuse the heck out of ones IDE editors so that they can not > properly color code or provide relevant hints and auto-completes for > ones JavaScript code. You will also probably want to add some relevant > headers so that the browser properly caches the downloaded file as > desired according to ones goals. > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316883 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IT IS TOTALLY possible to skip js with cfif
s. isaac dealey wrote: > Not with a default install... You can do that however if you customize > your webserver settings so that .js files are parsed by CF. For a long > time I'd considered creating my own site using .ike files. I never have > though. ;) You are also not required to name your linked JavaScript files with the '.js' extension. There is nothing preventing one from doing something like. . And then put your CFML built JavaScript code in the "myJavaScript.cfm" file. This will most likely confuse the heck out of ones IDE editors so that they can not properly color code or provide relevant hints and auto-completes for ones JavaScript code. You will also probably want to add some relevant headers so that the browser properly caches the downloaded file as desired according to ones goals. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316880 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: IT IS TOTALLY possible to skip js with cfif
> It is 100% possible to skip java script code using CF conditioning. I > use CF conditioning in JS code all the time. I change variable names, > feed variable values to JS, turn functions on and off, etc. > > To do this you have to run the JS code in-line so it's parsed through > the CF interpreter. You can either put the complete JS code in the > head or body of your page or put it in a CFINCLUDE that calls into the > page for in-line execution. You cannot do it if you have the script in > a .js file. Not with a default install... You can do that however if you customize your webserver settings so that .js files are parsed by CF. For a long time I'd considered creating my own site using .ike files. I never have though. ;) -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 781.769.0723 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316879 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: IT IS TOTALLY possible to skip js with cfif
It is 100% possible to skip java script code using CF conditioning. I use CF conditioning in JS code all the time. I change variable names, feed variable values to JS, turn functions on and off, etc. To do this you have to run the JS code in-line so it's parsed through the CF interpreter. You can either put the complete JS code in the head or body of your page or put it in a CFINCLUDE that calls into the page for in-line execution. You cannot do it if you have the script in a .js file. Robert B. Harrison Director of Interactive services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be &. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316860 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4