NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
JS encoding before uploading to remote server
Veteran

Joined: 22 Feb 2006
Posts: 106
Reply with quote
Hi,

There's a really cool option in PhpEd : encoding project before uploading to a remote server. Now, of course, the encoding only works for PHP files.

Well, I'd really like my javascript files to be encoded too ; I have written some PHP code to encode these files but what I'd need is to encode the files automatically before uploading them to the remove server, in the same way it is done for PHP files. Would it be possible using the great integration tools PHPed proposes to do something like that ? If it is not the case, can u plan it for your future release ? It would really improve the deployment of my projects.

Thanks in advance and congratulations for the best product ever
View user's profileFind all posts by medifirstSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
The catch is that any JavaScript you encode, has to be decoded on the client side by the browser. Unless you are planning to ship some special browser plug-in such as an activeX control, you cannot do it. By comparison, encoded PHP is decoded on server side, and therefore it is universally readable by any standard browser.

However, what you can do without any special browser plug-ins, is to obfuscate your JavaScript code. It is not the same as encoding, but rather just making your JavaScript very hard to understand. I have been using a PHP library based on Dean Edward's Packer. The primary function of Packet is to compress your JavaScript (very large scripts download faster), but it also has very nice obfuscating functionality. I highly recommend it : http://joliclic.free.fr/php/javascript-packer/en/

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website
Veteran

Joined: 22 Feb 2006
Posts: 106
Reply with quote
Yes, you're totally right. I was speaking about obfuscating the code.

The main idea of my feature request if that I wanted this obfuscation to be done optionnally but automatically before uploading the javascript files on the remote server using PhpEd. And thanks for your link, it's a lot better than the ones I found Very Happy
View user's profileFind all posts by medifirstSend private message
JS encoding before uploading to remote server
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic