Recent

Author Topic: pas2js compress or minify js file  (Read 374 times)

Prakash

  • Jr. Member
  • **
  • Posts: 50
pas2js compress or minify js file
« on: November 27, 2022, 04:14:10 pm »
how to compress or minify JavaScript in pas2js

Thaddy

  • Hero Member
  • *****
  • Posts: 12621
Re: pas2js compress or minify js file
« Reply #1 on: November 27, 2022, 04:57:48 pm »
strip whitespace and lineendings. Normally this is not necessary.
It is so easy to do that I am not even prepared to write you an example.
« Last Edit: November 27, 2022, 04:59:36 pm by Thaddy »
The only thing I can say about Putin - born st Petersburg- is that he is indeed Russian, as opposed to Stalin, who was Georgian. Depending of historical time frame they could both be Lithuanian or Polish...even German. Shut him up!

domasz

  • Full Member
  • ***
  • Posts: 133
Re: pas2js compress or minify js file
« Reply #2 on: November 27, 2022, 05:22:36 pm »
how to compress or minify JavaScript in pas2js
If you want to use it on a webserver then make sure the server is gzipping JS code on the fly or pre-gzip the code and make sure the HTTP headers are set correctly for it.

Prakash

  • Jr. Member
  • **
  • Posts: 50
Re: pas2js compress or minify js file
« Reply #3 on: November 27, 2022, 05:42:16 pm »
code is visible to customer . We want to do the obfuscated javascript code .

we don't want to share the business logic or  any source code to anyone

Thaddy

  • Hero Member
  • *****
  • Posts: 12621
Re: pas2js compress or minify js file
« Reply #4 on: November 27, 2022, 05:56:53 pm »
Obfuscation is the worst kind of security. (none)
Anyway, for the dumb customer you can use Base64. But dumb programmers.....
No examples given because of sheer stupidity.

Although there should be some examples by others and me that may help you.
Or is the search button also obfuscated? :-X

Anyway, better than wasm it won't get.
« Last Edit: November 27, 2022, 06:02:46 pm by Thaddy »
The only thing I can say about Putin - born st Petersburg- is that he is indeed Russian, as opposed to Stalin, who was Georgian. Depending of historical time frame they could both be Lithuanian or Polish...even German. Shut him up!

korba812

  • Sr. Member
  • ****
  • Posts: 318
Re: pas2js compress or minify js file
« Reply #5 on: November 27, 2022, 06:24:20 pm »
we don't want to share the business logic or  any source code to anyone
Keep business logic on server side.

Thaddy

  • Hero Member
  • *****
  • Posts: 12621
Re: pas2js compress or minify js file
« Reply #6 on: November 27, 2022, 06:47:20 pm »
Correct.
The only thing I can say about Putin - born st Petersburg- is that he is indeed Russian, as opposed to Stalin, who was Georgian. Depending of historical time frame they could both be Lithuanian or Polish...even German. Shut him up!

PierceNg

  • Sr. Member
  • ****
  • Posts: 292
    • SamadhiWeb
Re: pas2js compress or minify js file
« Reply #7 on: November 28, 2022, 03:20:45 am »
how to compress or minify JavaScript in pas2js

The friendly wiki has a page for this.

 

TinyPortal © 2005-2018