Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8472767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:10:01+00:00 2026-06-10T17:10:01+00:00

This may seem like an unusual request, but does anyone have T-SQL (MSSQL2008) code

  • 0

This may seem like an unusual request, but does anyone have T-SQL (MSSQL2008) code to “minify” javascript code?

I have a MVC site that uses a series of stored procs to generate the contents of a *.js file, and preferably after the SPs built the javascript, it could use a UDF/SP to ‘minify’ it.
I thought about creating a second SP set that would contain the minified version, but that would be a maintainance nightmare (doubling the current 10 SP’s that build the javascript code).

I didn’t know if the logic used to minify was simple enough that an SP/UDF could do it, and if lucky someone had already written it and was willing to share 🙂

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:10:03+00:00Added an answer on June 10, 2026 at 5:10 pm

    I don’t think that minifying javascript using a SP is a good idea. You will end up with something really complex I guess. The simplest minifier that I know is jsmin and it still 300 lines of C.

    Another approach could be to user a minifying proxy as a web server. I guess that it’s quite fast (less than 20 lines of code) to come up with something using nodejs and uglifyjs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may seem like an odd question, but does anyone know the origin of
This may seem like a rudimentary request, but I can't seem to get it
This may seem like a dumb question but I have IDLE and I'm trying
This may seem like a very simple question, but I have been struggling with
this may seem like a stupid question but I have a query string which
This may seem like an obvious problem, but I have looked on the facebook
This may seem like a simple questiom, but I have the following html <div
this may seem like a very basic question, but i have difficulty grasping it,
This may seem like a stupid Question but i have two cubes being rendered
This may seem like a nit-picky detail, but I am wanting to disable to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.