Wasn't it Martin who wrote: > >As already posted there is no way to hide your javascript or stop >others copying it. > >You can make it more difficult for others to reuse your code though. > >Obfuscate and compress it. > >Shrinksafe is a free utility that will obfuscate your javascript: >http://shrinksafe.dojotoolkit.org/ > >And then compress your obfuscated javascript using this page: >http://demo.java2script.org/lz77js/ > >You'll end up with completely unreadable javascript - and as a bonus >it'll be smaller in size than the original (unobfuscated and >uncompressed) version. >It won't be 100% safe and a determined person can still find a way to >copy it - but it's enough to stop the casual copy/paster from reusing >your code.
That's fine if it's your expertly crafted Javascript code that you want to protect. If you want to protect the data that you've spent a lot of effort to collect, then you might also consider encrypting that separately. Something like this: http://econym.org.uk/temp/decodeXML.htm which reads the data from http://econym.org.uk/temp/encoded.txt That's just a "proof of concept". In practice you'd want to use a more powerful encryption system and also obfuscate the Javascript that decodes it. Even so, a skilled FireBug or Venkman user would be able to break that fairly easily. To achieve anything like real protection of your database, you'd need to pass only the actual data that you need to display to your Javascript at the time that you need to display it. That way, the only data that can be captured by hacking the Javascript is the same as what could be captured by screen scraping the browser display. You'd need to make your data server secure, only returning the data to requests that really come from your own page. -- Mike Williams http://econym.org.uk/gmap --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
