How to enable jQuery, javascript, CSS files compression - apache

It is my first time I want to enable jQuery, Javascript and CSS files compression
but I don't exactly know where to start I searched the net but there was not a detailed
example that I could implement that in my project.
Please Help me that how can I enable jQuery, Javascript and CSS files compressions?
1-In windows servers?
2-In Appache Servers?
also can I enable it through .htaccess files?

You can use the following:
http://www.jsmini.com/
Google released Closure Compiler which seems to be generating the smallest files:
https://code.google.com/p/closure-compiler/
or
http://yuilibrary.com/download/#yuicompressor

Use Yahoo compressor here is the link: http://yui.github.io/yuicompressor/
for compressing your web pages javascript or jQuery files
or use this JASOB here is the link: http://www.jasob.com/

Related

How would I host the static HTML, CSS, and JS files to host Swagger UI without using Node?

I want to host the Swagger UI behind the same webserver our API is running on (at least on dev and staging). Is it possible to do that without having to use Node whatsoever? I feel that it should be possible to host the static HTML, CSS and JS files but I can't see how.
This page* on Github suggests that swagger-ui-dist is designed for this scenario but the related page** doesn't really explain how to implement it but seems to show that Node is still required anyway.
I find the docs quite confusing.
*https://github.com/swagger-api/swagger-ui
**https://www.npmjs.com/package/swagger-ui-dist
I just worked it out. All the static files I require are in the dist directory.

Add CSS File to WebCenter Sites application

I have a WebCenter Sites installation. Separately, I have site.js and site.css files. How can I make a WebCenter Sites template use these two files? Where do i put those files so they can be consumed?
What I've done so far is set up a simple HTTP server outside of WebCenter Sites and used <link> and <script> tags to point to those files on the external server. This does indeed work, but I prefer having the files served from the sites application.
I see sites exposes a CSS type asset, but it seems to be tied to their widget framework. I was thinking to just make an empty widget with CSS, then I could reference the widget/asset in the <link href=. Again there aren't many examples of this online.
Can anyone give me some ideas on how to serve files from within WebCenter Sites?
There are alternatives to storing files directly in the webapp, such as using a custom basic assettype to contain the files, and then delivering them via blobserver (or just rendering inline). The advantage to this is that you are managing assets to keep environments in sync, rather than updating the webapp & redeploying.
The path needs to be relative to the web application context. There are probably better ways to reference it in Sites, but the lowest-common denominator approach that will work for all J2EE web applications is to use pageContext.request.contextPath, so the link would look like:
href="${pageContext.request.contextPath}/src/stylesheets/css/styles.css"
So if this were used with a JSK, the src folder would be under [JSK_HOME]\App_Server\apache-tomcat-7.0.42\Sites\webapps\cs

Including Images in RenderPDF in Play Framework

I use Play framework 1.2.x
I use PDF module renderPDF to generate PDF from HTML. I would like insert a image into the PDF.
Im trying to download image from controller downloading in the HTML which will be render as PDF as like this
<img src="#{AwardController.getSignature()}">
From the forums I found that we need to define play.pool in application.conf, So I defined it and works well in local environment. But It doesn't work in QA or Prod environment where we have two processors, so I thought it would take nbprocessors+1. I tried both defining play.pool and not defining. But there is no luck in QA/Prod environment. Please help me to resolve
UPDATE: It working when http request, but not works in https request. Do we have any settings anywhere to resolved this

How to use GZIP?

I am new at using GZIP.
I'm using a Wordpress plugin that GZIP the website but I ran the Google Speed test and it says that the website is not gzipping bootstrap .less files and the javascript files that I call.
I'm not sure how to call a gzip or even making one, can somebody help me?
Javascript should be served minified and after minification both JS and CSS should be served compressed. Have a look at How to 'minify' Javascript code
If you are using apache 2.* as your web server you could enable mod_deflate. You can then configure the module to compress .less and any other static content you want to compress.
Here is a link to the documentation for the module: http://httpd.apache.org/docs/2.2/mod/mod_deflate.html

What are these .dll's that I see embedded or referenced in web pages?

I'm researching how to build some tools in my website and as I'm looking around examples of similar tools in other websites, I've noticed the source code referring to .dll files. I'm relatively new to web development, so I'm only accustomed to seeing references to script files. What are these .dll's that I see referenced in web pages?
Thanks so much in advance for your wisdom!
They are just server side code that will generate HTML (or JS/CSS/Images), similar to .php files or Java Servlets.