SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Running javascript of a website offline

    If I want to run javascript of a website offline on my PC, what should I do?
    It seems that I should save all the website content and scripts in a MHT file with IE, then run the MHT file.
    e.g. for the http://www.weewelcome.ca/weeapp/index?N=0&Ne=1 website, if I save all the website content and scripts in a Webpage complete HTML file, then the five images will stop rotating offline.

  2. #2
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    936
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Javascript isn't really the issue. The browser doesn't care if its online or offline. What is important is that all the assets (scripts, images, etc..) are available locally.

  3. #3
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can avoid most problems, aside from absolute urls, by running a server on the local machine and storing and serving 'offline' content from there.

  4. #4
    SitePoint Member
    Join Date
    Nov 2010
    Location
    florida
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best way to prevent any potential conflicts you may have with viewing your scripts would be to run through a local server.

    I would recommend XAMPP
    http://www.apachefriends.org/en/xampp.html

    Once you are done with the setup, go to your C drive -> XAMPP and store all your files within the htdocs directory.

    To run it, you type:

    http:// localhost/your_filename in your web browser.


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
  •