# Protection

**URL:** <https://forum.kirupa.com/t/protection/23152>\
**Category:** random\
**Created:** [June 13, 2003, 6:01pm UTC](https://forum.kirupa.com/t/protection/23152 "2003-06-13T18:01:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [June 13, 2003, 6:01pm UTC](https://forum.kirupa.com/t/protection/23152/1 "2003-06-13T18:01:11Z")

</div>

How do you keep people from caching a .swf into their temporary internet folder? Sites which do this, from the ones that I noticed, are [www.2advanced.com](http://www.2advanced.com) and [www.orisinal.com](http://www.orisinal.com) .

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 13, 2003, 6:21pm UTC](https://forum.kirupa.com/t/protection/23152/2 "2003-06-13T18:21:50Z")

</div>

i think you can do this with JavaScript or PHP, or Flash… the basic method, i believe, is just to stick a load of random variables onto the end…like this:

[AS]getURL("[www.mysite.com/preventcache.html?"+(math.floor(math.random()\*9986](http://www.mysite.com/preventcache.html?%22+(math.floor(math.random()*9986)))[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 13, 2003, 7:20pm UTC](https://forum.kirupa.com/t/protection/23152/3 "2003-06-13T19:20:38Z")

</div>

can also add nocache into you headers…  
and check this out:  
[http://www.helpqlodhelp.com/blog/archives/000033.html#more](http://www.helpqlodhelp.com/blog/archives/000033.html#more)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 13, 2003, 8:26pm UTC](https://forum.kirupa.com/t/protection/23152/4 "2003-06-13T20:26:41Z")

</div>

Keep in mind this method does make your viewers have to wait the full loading time everytime they view your site (since it won’t be cached the browser has to download a new one each time), so if you are going to do this I recommend using it on a file that isn’t not a large file size.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 3:20am UTC](https://forum.kirupa.com/t/protection/23152/5 "2003-06-14T03:20:25Z")

</div>

Also keep in mind that this will be a strain on your site’s bandwidth as well. I hope you have unlimited bandwidth on your hosting plan. 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 3:22am UTC](https://forum.kirupa.com/t/protection/23152/6 "2003-06-14T03:22:13Z")

</div>

so if i have a 200kb site, and someone views my site 2 times in one day, it wont take up 400Kb?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 3:23am UTC](https://forum.kirupa.com/t/protection/23152/7 "2003-06-14T03:23:44Z")

</div>

well do the math, if the site isn’t being cached then that means the viewer would have to download 200kb each time they view it.

So if they view it twice then yes that’s 400kb.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 3:26am UTC](https://forum.kirupa.com/t/protection/23152/8 "2003-06-14T03:26:18Z")

</div>

i guess if you have bandwith to burn then i would protect the file. but isnt there a way that you can disable the “view source” option?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 3:29am UTC](https://forum.kirupa.com/t/protection/23152/9 "2003-06-14T03:29:12Z")

</div>

What’s the point of disabling it? If the file is cached, it is downloaded into the temp folder.

There is no 100% way to protect the files, if there’s a will, there’s a way…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 3:41am UTC](https://forum.kirupa.com/t/protection/23152/10 "2003-06-14T03:41:29Z")

</div>

You can disable Right Click/View Source, but you can’t disable View/Source on a browsers menu (File/Edit/View, etc)

And as EG said, if you cache it, it is saved, if you don’t, they keep reloading the file which uses up bandwidth, and they can always get the direct URL to your file no matter what.

It’s not worth the extra trouble. Not even 2A is protected, they just want to make it harder because they know a ton of people want their stuff.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 5:20am UTC](https://forum.kirupa.com/t/protection/23152/11 "2003-06-14T05:20:13Z")

</div>

> \*Originally posted by lostinbeta \*  
> \*\* Not even 2A is protected, they just want to make it harder because they know a ton of people want their stuff. \*\*

I checked my temporary internet folder and I couldn’t find _working_ SWF files from 2advanced or Orisinal. So that means they make people reload the files each time they visit their site?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 5:31am UTC](https://forum.kirupa.com/t/protection/23152/12 "2003-06-14T05:31:59Z")

</div>

Apparently so…

Sites like 2A have unlimited bandwidth so they don’t care how many times their sites are being downloaded.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 5:38am UTC](https://forum.kirupa.com/t/protection/23152/13 "2003-06-14T05:38:47Z")

</div>

“working?” explain.  
it is possible to use loadMovie in an all flash site to bring in swf’s which only operate if they are within the main swf (using if’s), but they will still cache

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 5:43am UTC](https://forum.kirupa.com/t/protection/23152/14 "2003-06-14T05:43:40Z")

</div>

> \*Originally posted by clownstaples \*  
> \*\*“working?” explain. \*\*

The cached files work in a web browser, but don’t work in a regular SWF player.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 5:45am UTC](https://forum.kirupa.com/t/protection/23152/15 "2003-06-14T05:45:32Z")

</div>

Supree, they do work, it’s just that they only work if all the swf’s are together, individually they might do nothing at all because one controls the other.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 5:48am UTC](https://forum.kirupa.com/t/protection/23152/16 "2003-06-14T05:48:23Z")

</div>

i got it working. the main swf (v3) just had to have its external files in the same folder with it, with the right names  
(home.swf, audio.swf, and some jpgs)

edit: just saw previous post…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 8:44am UTC](https://forum.kirupa.com/t/protection/23152/17 "2003-06-14T08:44:08Z")

</div>

You can easily disable that by checking if the \_url property of the file has http:// in it (which means it’s on the internet, so presumably on your site, lol) and if not, just fscommand exit or goto a frame with no content/ warning message.  
There’s a tool here: [http://www.genable.com/aso/](http://www.genable.com/aso/) supposed to hide your code even from ASV (ActionScriptViewer, for the non-hackers amongst us… lol again).  
It’s all a question of how much trouble you want to take upon you to hide your precious code…

**edit** \*  
and “they can always get the direct URL to your file no matter what” is not tru, you can always generate the url with php, so they won’t know where the actual file is, and one more trick:  
flash will load a file even if the extension is not swf, so you can put anything there, like txt, gro, edl, whatever really, flash doesn’t care, it’ll load it…and even no extension at all, so it gets harder to find the actual swfs in the cache…  
**end edit**

**edit edit, lol**  
i’m sticking this for a lil’ while, just in case this is of interest to some others… just a lil’ while tho’… "  
**end edit edit**

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 8:03pm UTC](https://forum.kirupa.com/t/protection/23152/18 "2003-06-14T20:03:45Z")

</div>

You can also try this.

[http://www.flashkit.com/tutorials/Actionscripting/Basic/Easy\_to\_-Tiran\_Da-674/index.php](http://www.flashkit.com/tutorials/Actionscripting/Basic/Easy_to_-Tiran_Da-674/index.php)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 8:14pm UTC](https://forum.kirupa.com/t/protection/23152/19 "2003-06-14T20:14:21Z")

</div>

Nice link Meridian.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 14, 2003, 8:16pm UTC](https://forum.kirupa.com/t/protection/23152/20 "2003-06-14T20:16:22Z")

</div>

Domo arigato Mr Lostinbeta-bato

[Next page](https://forum.kirupa.com/t/protection/23152.md?page=2)
