1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ways to prevent site files from being download from browser.

Discussion in 'General Programming Chat' started by keltplayer, Feb 25, 2009.

  1. keltplayer

    keltplayer Junior Member

    Joined:
    Nov 5, 2008
    Messages:
    130
    Likes Received:
    8
    Ok what I mean is, for instance if you're using FF, anyone can 'File>Save Page As' So is there a way to prevent those from being downloaded? Like editing htaccess or cpanel etc?
     
  2. tobacco

    tobacco Registered Member

    Joined:
    Nov 3, 2008
    Messages:
    75
    Likes Received:
    28
    Location:
    Earth
    You can use some javascript to disable right-clicking. But that lowers site usability.

    There really isn't a 100% way to prevent it. On the internet, if you can view it, you can save it (for the most part).
     
  3. keltplayer

    keltplayer Junior Member

    Joined:
    Nov 5, 2008
    Messages:
    130
    Likes Received:
    8
    Ok because I've a Link Hiding/Protecting Site ( ilix{dor}in ), and I'm halfway through making it prefect. When i use the protected link to view this page for instance, the source code is 'so-called' to be encrypted using js. But when i save the whole page using firefox, there's a single file that seems to disclose the original link.

    So, i need not want to disable the whole 'save page as' but is it possible for a single specific file not to be download from save page? Or can my coding be improved to prevent it from being downloadable?
     
  4. eshaman

    eshaman Registered Member

    Joined:
    Jan 4, 2009
    Messages:
    77
    Likes Received:
    74
    there is no way to disable 'save as' but I don't think that is the solution anyway.

    Maybe using flash in the redirect would be better?
     
  5. kovah

    kovah Newbie

    Joined:
    Feb 24, 2009
    Messages:
    37
    Likes Received:
    9
    Location:
    New Zealand
    Using javascript's "Eval" and "Unescape" and encoding your content in hexadecimal does pretty well to stop most people from being able to read it. Seeing as you can't really stop people from downloading your site.
     
  6. justone

    justone Elite Member

    Joined:
    Oct 12, 2008
    Messages:
    1,516
    Likes Received:
    1,037
    Occupation:
    -
    Location:
    Europe
    If you want to invest the work and know about programming then you can use ajax techniques and javascript techniques paird with referer testing.
    That's only useful if you have a larger site with much information in it, you can make it very hard to extract the sources.
     
  7. keltplayer

    keltplayer Junior Member

    Joined:
    Nov 5, 2008
    Messages:
    130
    Likes Received:
    8
    :O sounds complicating how can i go abt doing it?