Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
What on a server, would cause JavaScript in the HTML source to be stripped of comments and returns or new lines?

I have an HTML page with JavaScript in it and when I view the source of the page in my Browser(s), the JS comments are stripped out and the JS code is all on one line. I will call this reduced code as it is not fully minified. I do not want this. I have told my host and he is working with the server guys but so far no luck in fixing. The code is not reduced if the JavaScript has an error so I am assuming something on the server is validating the code and reducing it. The same code on a different server is not being reduced so it is not my Browser.

Here is a screenshot of the code - I have downloaded it with FTP and it is still normal on the server so was not changed during uploading.

Source

Here is a screenshot of what I see in the source (it is the same in Chrome, Firefox and Edge).

enter image description here

Note: We are not using a CDN like CloudFlare. It is an Apache 2.4.51 server on linux.

Any ideas I could suggest to the tech support? Please keep in mind that I am not a server guy.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Ask them for an SFTP connection to the server folder where your HTML files are served from. Upload your HTML file to the server folder with FileZilla over the SFTP connection. This should hopefully bypass whatever server side javascript minification script they are running.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!