SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast alsaffar's Avatar
    Join Date
    Aug 2002
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Prevent JavaScript files from being cashed

    Hi everybody,

    I used to include my JavaScripts file in my html pages, like:

    <script language="javascript" src="/FileName.js"></script>

    Its working fine except that the file once its opened by the browser, it will be saved (cashed) on the surfer PC. Later if I want to edit the included JS file and re-upload it to the server, the surfer will not see the effect since the old file was cashed on his/her PC.


    I used:

    <META content=1800 http-equiv=REFRESH>
    <META content="text/html; charset=windows-1256" http-equiv=Content-Type>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">

    but still when I closed my browser and go to the Temporary Internet Files folder I saw all the JS files there

    How can I prevent JavaScript files from being cashed on the surfer PC?
    HaVe a GooD DaY

    @li @l$@ff@R

  2. #2
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think JS works server side. Check in Google, its not used much, but I think it does exist. A search for "server side javascript" may be of help. Busy at the moment, but help again later as interested as well.
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •