5

Sadly I have to make a website (so to speak website) that can be placed on a CD. My question is, can I use JavaScript and jQuery?

Some of the people who get the CD might have IE6 on Win XP installed.

Thank you.

Francisc
  • 77,430
  • 63
  • 180
  • 276
  • Some browsers block script execution on local content – JohnP Jun 07 '11 at 09:52
  • 6
    I gave you a pity +1 – nickf Jun 07 '11 at 09:53
  • 1
    Yes, you can. JS is a client-side language so, as long as JS will be enabled on the browser, everything will be ok. Oh, and regarding IE6... life's hard :p – sica07 Jun 07 '11 at 09:56
  • why don't you create a tiny html file, save it locally and try it :) I would do that myself, but luckily Ubuntu doesn't know the concept of IE :) – mkilmanas Jun 07 '11 at 09:58
  • Yeah, I would too, but I can't find any XP machines and my laptop CPU doesn't like virtualization. – Francisc Jun 07 '11 at 09:59
  • Thanks, corroded, I'll give that a try. Left or right? – Francisc Jun 07 '11 at 10:00
  • 3
    If you need to support IE6, you **NEED** a way to properly test it in IE6. Do it often while you're developing. It's horrible when you only check it at the end and find there's an overwhelming amount of issues to fix. – thirtydot Jun 07 '11 at 10:01
  • will the user be completely offline? if so you'll need to include the Jquery .js files with your cd bundle and reference them explicity rather than linking to an online version as is often done. – TygerKrash Jun 07 '11 at 10:03
  • hell if it was me id do both. maybe you could insert a script there targetted at IE users to give them a zillion js alerts that says: "TO CLOSE THIS, SHUT DOWN YOUR COMPUTER AND UPDATE YOUR IE" – corroded Jun 07 '11 at 10:03

3 Answers3

4

Yes. jQuery explicitly supports IE6, and IE6 supports JavaScript (it would have to, otherwise jQuery couldn't support it) although it has some bugs.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
2

You can put a website on to CD, and javascript/jquery should work fine. But beware that you'll only be able to have static resources: that is every request must be for a physical asset that exists on the CD. I.e you wont be able to have pages rendered dynamically in response to a request, and I'm pretty sure that you won't be able to make ajax requests too.

Richard H
  • 38,037
  • 37
  • 111
  • 138
2

I had experience of making such a thing. It was a catalog of goods. So I grab all data and converted it to JSON. The catalog itself was only one page which show the goods using JS and client-side templating, doing some sorting and search. The biggest problem with using this catalog was that fact that reading much of small files from CD is really slow. So it was necessary to use as much CSS-sprites as possible instead of regular set of good's photos.

bjornd
  • 22,397
  • 4
  • 57
  • 73