NoScript tag location?

So as a new user to ColdBox I had a simple question: I'm trying to put
in a noscript tag and didn't know the best place to put it in my
application. I've identified 3 possible locations:
  1) main.cfc, onRequestStart to test for noscript. Seems
reasonable; however it's not on a layout page, per se.
  2) every layout page I currently have. Currently there are 4 but
there is the possibility this may grow; my only concern is
maintainability...but I'm not opposed to this solution.
  3) index.cfm (I'm not sure how I feel about this one), but I know
it's called every time.

If anyone could just help me out that would be great. I'm not opposed
to doing anything and I'm just looking for the answer which would be
best suited to meet my need.


Don’t know what you’re putting in the noscript tag but, if it’s the same for all layouts, put it in the layout. In terms of maintainability, you can cfinclude the noscript code from a file. That way you write it once and cfinclude it in all the layouts that need it.

No need to modify index.cfm, ever really. onRequestStart, as you note, is not layout related.

There are more complicated ways to accomplish this but, stating out and out of those options, I’d put it in the layout.

  • Gabriel