How to make website available offline - offline

I want to make my website available offline even if the user clears the cache and cookies. Is is possible? Also I am dealing with database. Is is possible to handle databases offline?

A user could store a local copy of a single webpage using Chrome (right click save-as) and it will store all resources (images, css, js) required to fully load the page offline. Other browsers will have similar options.
You can use wget to mirror a whole website for offline browsing.
wget --mirror --convert-links --html-extension -p http://www.example.com/
of course neither of these options will handle database driven elements of your site/page.
If you want to mock a database or dynamic elements of a page offline then Google Gears is probably the closest to what you are looking for but I think it was deprecated by Google last year.

If your users have modern browsers, try HTML5 Application Cache.
References:
Overview - http://www.html5rocks.com/en/features/offline
Demo - https://jonathanstark.com/labs/app-cache-7/
Tutorial - https://www.html5rocks.com/en/tutorials/appcache/beginner/
Article - http://grinninggecko.com/developing-cross-platform-html5-offline-app-1/

Summary: Click me, I'm the newish thing that browsers now support!
I clicked some of the links found in other answers, and all tools mentioned are deprecated or will/should be soon.
Later when I wasn't connected to the internet, I opened a site operated by Google (either Google Docs or YouTube, I sadly forgot since then) and went to view the page source, as I was curious to see other answers in action. I found something called ORIGIN-TRIAL in the manifest file.
After a quick Google search, I found this, which brought me to this, which somehow brought me to the last link:
https://developers.google.com/web/fundamentals/primers/service-workers
In conclusion, use Service Workers now. If you're curious if it now works with all browsers, don't worry. All popular browsers should support it as seen here.

No, if your databases are housed online. then you need a internet connection for the PHP/ASP (whatever you're using to deal with DBs) to connect/communicate to the DB's

For storing data locally and accessing them offline take a look at Gears and Web Storage.
The main problem is what degree of functionality you want to provide with your website. It always requires some work on the client (user) side to "store" aka. save your website offline. You would have to store all your functionality in one page that the user stores (be it a Flash movie or some Javascript-Code).

You can use simple command to download whole website locally with all links working properly.
wget -rk 'http://www.website.com'
For https url you need to add one more property like below :
wget -rk --no-check-certificate 'https://www.website.com'

Related

Export a SiteCore Page

I am looking to export an entire sitecore page. Ideally, upon exporting the links would move from relative to absolutely, but that's not necessary. I want to download the html, css, images, everything from one of my pages. Any help would be greatly appreciated.
Assuming that you want to download one page only, you should be able to just use Save option in your browser. Most of the modern browsers supports all of your requirements. Sitecore web page is like any other html page.
If you want to download the whole site, you can try to use http://www.httrack.com/, wget or Firefox plugin as described here.
If none of those are enough, try to search for save entire site with images and css in your favourite search engine - there are plenty of other possibilites.
If I only have to locally save a page hosted in our Sitecore (really doesn't matter what's hosting it) I use wget.
This seems to work quite well:
wget.exe -E -H -k -K -p --no-check-certificate <your url>
You can change the parameters to recursively spider the whole site, if you do so make sure to check with your security department to not set of any alarms.

Django Online File Browser

everyone:
Recently,I meet a problem when I'm using Django to devlope my site.
In my project, one requirement is to view file online.
That is to say, one can browses files of formats:pdf, jpeg,doc and so on
directly in browsers such as chrome or firefox and so on.
I know this can be done by flash,FlexPaper is one solution. But in django,
not in flash,is there any other solutions? Anyone knows that? If not, I can
only use flexpaper and maybe site can't be accessed via apple devices
Many thanks!!
I think, you can use https://github.com/NetAngels/django-webodt (documentation) with option inline=True:
render_to_response(..., inline=True)
There are plenty of non-flash file browser plugins out there: Elfinder has a Django connector, and you can probably get an integration with CKfinder.
The django packages page also has a list of django file browsers link.

ember hash urls in google

I am concerned about page ranking on google with the following situation:
I am looking to convert my existing site with 150k+ unique page results to a ember app, off the route. so currently its something like domain.com/model/id - With ember and hash change - it will be /#/model/id. I really want history state but lack of IE support doesn't leave that as a option. So my Sitemap for google has lots and lots of great results using the old model/id. On the rails side I will test browser for compatibility, before either rendering the JS rich app or the plain HTML / CSS. Does anyone have good SEO suggestions with my current schema for success.
Linked below is my schema and looking at the options -
http://static.allplaces.net/images/EmberTF.pdf
History state is awesome but it looks like support is only around 60% of browsers.
http://caniuse.com/history
Thanks guys for the suggestions, the google guide is similar to what I'm going to try. I will roll it out to 1 client this month, and see what webmasters and analytics show.
here is everything you need to have your hash links be seo friendly: https://developers.google.com/webmasters/ajax-crawling/
basically You write Your whole app with hashlinks, but You have to add "!" to them, so You have #!/model/id. Next You must have all pages somewhere generated and if google asks for them, return "plain html" as described here: https://developers.google.com/webmasters/ajax-crawling/docs/getting-started
use google webmaster tools to check if Your site is crawlable.
I'm not sure if you're aware that you can configure Ember to use the browser history for the location API and keep using your pages the way they are reference now. All you need to do is configure the Route's location property
App.Router.reopen({
location: 'history'
});
See more details about specifying the location api here

Tracking User Actions on Landing Pages in Django

I'm developing a web application. It's months away from completion but I would like to build a landing page to show to potential customers to explain things and gauge their interest--basically collecting their email address and if they feel like it additional information like names + addresses.
Because I'm already using Django to build my site I thought I might use another Django App to serve as this landing page. The features I need are
to display a fairly static page and potentially a series of pages,
collect emails (and additional customer data)
track their actions--e.g., they got through the first two pages but didnt fill out the final page.
Is there any pre-existing Django app that provides any of these features?
If there is not a Django app, then does anyone know of another, faster/better way than building my own app? Perhaps a pre-existing web service that you can skin and make look like your own? Maybe there's the perfect system but it's PHP?--I'm open for whatever.
Option 1: Google Sites
You can set it up very very quickly. Though your monitoring wouldn't be as detailed as you're asking for.. Still, easy and fasssst!
Option 2: bbclone
Something else that may be helpful is to set up some PHP based site (wordpress or something) and use bbclone for tracking stuff on it. I've found bbclone to be pretty intense with the reporting what everyone does - though it's been a while since I used it.
Option 3: Django Flatpages
The flatpages Django contrib app is pretty handy for making static flat pages. I'd probably just embed a Google Docs Form to collect email addresses (as that's super fast and lets you get back to real work). But this suggestion would still leave you needing to figure out how to get the level of detail you want on the stats end.
Perhaps consider Google Analytics anyway?
Regardless, I suggest you use Google Analytics with everything. That'll work with anything you do really, and for all I know, perhaps you can find a way to get the stats you're really looking for out of it.

Iphone and php application

I created php pages.. those php pages are registration form.with the fields.FirstName,LastName and CompanyName...If I fill the information in that form and hit submit the data will store it on the mysql database.And I created one page...that displays the data which I have added through register form...I have a button on this page which displays the data...my question is when I click that button...my display data must store on the Iphone ...is that possible to do.....or any other solution.....and how to use php on Xcode....?
You appear to be confusing server and client-side programming.
If you want to run stuff on a website on the iPhone to save locally, you will have to use HTML5 and Javascript, and HTML5's feature for local databases (if the iPhone doesn't support this currently, it certainly will soon).
PHP will run on the server, if you want to save the data on the server-side.
If you want to run stuff only locally on the iPhone, then you'll want to look into XCode and Objective-C. The iPhone uses SQLite as a local database for applications to use.
Are you opening your webpage in Safari on the iPhone, or are you planning on having an application running?
If you have a server with a PHP application, why would you want to store the "display data" on the iPhone? Is this for offline use?
Users can copy/paste info to notes on their iPhone, though this is not a very handy solution.
If you want the phone to remember the data locally, you can set the expire header of your application to a date in the far future, but be careful as this has risks if you change data and the client doesn't learn about it because it thinks it has a valid local copy.
Also, read this (short) article about caching data with HTML on the iPhone: http://ajaxian.com/archives/html5-features-in-latest-iphone-application-cache-and-database
That suggests it is supported. But, I wouldn't know how. I'm sure google can help you there.
You could just capture the user's information in standard UITextField's and then submit the form programmatically using ASIFormDataRequest from the ASIHTTPRequest library. It's made specifically for posting data to a form.