View Single Post
Old 04-12-2012, 09:58 AM
Matt Ecwid's Avatar
Matt Ecwid Matt Ecwid is offline
Ecwid Team
Join Date: Oct 2011
Posts: 4,947

Originally Posted by Steve Strickland1 View Post
1. How can I control the speed of the redirection. When I test now, it's instant! Can I slow it down after 3-5 seconds?
By means of special functions in javascript, you can delay script execution. For example, the 'setTimeout' function can be used for such purposes.

2. How I protect my source code or the javascript from prying eyes? I don't want people to be able to just go see my source code, see where they are redirected and just grab the URL and bypass the whole shopping cart.
Frankly speaking, I am not sure why you want to do this. Who is going to see the source codes and why? You don't put any sensitive data in them, do you? As for bypassing the shopping cart, it isn't clear either. Could you possibly explain why you need it?

The thing is Javascript, CSS and HTML codes are processed on the client side (by browser). In order to parse HTML and CSS and execute Javascript, a browser has to download them all to an user's computer. It means that, technically, anyone who wants to see the sources will be able to do it.

As far as I know, the only way to protect your javascript code a little is making the source codes themselves not human-readable. It can be done by means of obfuscation of your code. Browsers will be able to parse and execute it as usual, but it will be a bit difficult for a human to read it. But even so, anyone will be able to see it.

If you need a professional help with custom modifications, I suggest you to contact our colleagues from Qualiteam: . They will be glad to help.
Matt K
Ecwid Team

Ecwid Guide for Beginners

Ecwid Help Center

Ecwid video tutorials
The Following User Says Thank You to Matt Ecwid For This Useful Post:
Steve Strickland1 (04-12-2012)