Question

J'expérimente la fonctionnalité de stockage locale HTML5, mais j'ai été frustré d'apprendre que le navigateur n'autorisera pas le stockage local lorsque le fichier est local. Je suppose que le navigateur (Chrome dans mon cas, ff aussi) veut voir un domaine plutôt qu'un emplacement de fichier. Quelqu'un ici a-t-il découvert une solution de contournement pour se développer localement? Peut-être la mise en place d'un domaine local? Cela ressemble trop à des problèmes. Il devrait y avoir une option de développeur dans le navigateur, Grrrrrr.

Était-ce utile?

La solution

How about using Python as a lightweight server, go to your working directory and:

python -m SimpleHTTPServer

See http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python for more details.

Autres conseils

You'll find that most web developers will set up a local web server, as it's the only way to work locally with server-side scripts—anything written in PHP, ASP.NET, Python, etc. which includes pretty much all content management systems. It's actually not too difficult, either. On Linux, just install Apache using your package manager (sudo aptitude install apache2 on Ubuntu). On Mac OS, you already have one installed—just turn Web Sharing on in System Preferences > Sharing and then navigate to http://localhost/~YourUsernameHere/. On Windows, I'd recommend installing the Apache HTTP Server if you just want a web server, or XAMPP if you want MySQL, PHP and Perl (which are great for server-side development) installed as well with minimum fuss.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top