Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
H!
I have created a website, where all the files are of the type CSS, js, pug, and when I want to publish the site, I need to give an index.html file from which the site will start. The problem is that I do not have such a file.
Does anyone know how to deal with such a problem?
And in addition, I started the site by running it in localhost: 3000 does anyone know how to start it now so that it will work when I upload it.
Thanks in advance to all the helpers.
Your mention of localhost:3000 implies that you have written a website which depends on Node.js for server-side code (at a minimum this will involve the translation of your Pug templates into HTML on demand).
There are two general approaches you can take to solve this problem:
Find hosting which supports your server-side code and deploy your Node.js application to it. (This will not be typical static or shared hosting).
Generate static HTML documents from your application and upload those HTML documents. (The specifics will depend on exactly what your server-side implementation does and will probably be a significant amount of work. Typically if you wanted to take this approach, you would have used a framework designed to output static sites from the outset).
Obviously if you have your server-side code processing user input (such as form submissions) option 2 will not work.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I've made a webpage on HTML and I want to run a .cpp application on it. With the way I've learnt to do it, the code is displayed.
The only way to do this is ActiveX, which by default is not supported by anything anymore. Only Internet Explorer supports it, but even that needs to be specifically allowed.
But you'd still have to first compile the cpp-code and do quite a huge amount of programming work before you'd have an valid ActiveX -dll. Then you'd also somehow need to deploy it for all website clients.
TL;DR: No, no no no. Running C/C++ for web clients is no-go.
However, if you are looking for something like that website client should be able to invoke a C++ application at the server, this is very possible. You still need to have that application compiled for the server environment though. For small "run and get the results" -tasks I've found it easiest to use ajax to call php -scripts, as php can execute stuff on server.
Signed Java Applets can run executables from browser, but it's not welcomed nowadays.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Given:
Suppose that I have a website called "exampledomain.com", and that on that website, I have one file called "my_doc.html", the full URL address of which is "https://www.exampledomain.com/my_directory/my_doc.html". (Not my actual website; this is just hypothetical).
Objecive:
I'm trying to develop a Client-Side Application, using C++ & Windows Sockets, that downloads my HTML file, parses it, extracts some specific information, runs some calculations, and displays its results to the user.
Question:
How do I download the HTML file from the server to the directory "C:/ExampleDirectory/" on the client-side computer, using the Windows Sockets Library?*
Clarification:
I want to write this Client-side program to work with the existing website. IE: I want it to download the file in the same way that an Internet-Browser like Microsoft Edge would.
Edit:
Just to clarify, the server uses a secure, account-based system, and thus the document would be transferred using HTTPS. I'm not really sure if this would effect the solution, but I thought it'd be worth mentioning.
Don't.
A socket library is not an appropriate tool to talk with a web-server. http is complex enough that you want to use a specialized http library. There are several such libraries available. curllib springs to mind. And of course there is the WinHttp tag https://stackoverflow.com/tags/winhttp/info.
And for the html part, you'd want to use an html parsing library to extract the desired info.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
It seems that anymore I have no clue what is going to happen when I launch the Help of a program. Which makes it all that much more confusing when having to decide how to create a help file for my application.
For example, it might open my web browser to local instance of an html file. It might point to a web-hosted help website. It could load up the Windows Help and Support center. It may load a chm file. It could load up a custom help form with menus, etc.
What is the "correct" way to implement a help?
I like the idea of chm file, but it makes it hard for me to push any updates to users without them updating the application. Same can be said for a local html based help file.
I also like the idea of doing a web hosted help file because I can update it as needed with new information, but what does that mean for users who don't have an active internet connection? For example (in my case, my software will be used equally in a car-mounted laptop with no internet connection and on a desktop computer with an internet connection)
I'm curious to know what is commonly done when creating a help file, and what authoring tools are used, if any.
A solution I have used for the mobile applications, is to have a local html help file which the application renders for help content in a web view. We then had a background mechanism to check against a service for help updates and download the updated HTML and other static content as appropriate. This way you always have a local HTML file which doesn't require a connection, and renders quickly (since there is no download required for viewing).
The most subtle way is providing a Compiled HTML (CHM) help file.
There are many free and paid apps that help create documentation. You could try Rahman CHM Maker or KEL CHM Creator.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
When does a single page web app need a loading page in the style of Gmail or RTM or the many others? Should there be a size at which I introduce one? Is it just about time?
And, is it just loading in the JS, CSS files etc, or is it doing processing too?
Also, as an aside, how would I even go about introducing such a page? Are there plugins/guides, etc?
Thanks!
It is a complex question. as many times the best answer is "it depends".
I think it is not about size but simply about how user experience you want to offer. More richest and dynamic content more rich your client must be.
So if you make many things dynamically using JS at client side, like gmail,where UI never freeze, the calls are asynchonous and content refresh is made by JS, you can arrive to have an architecture where server offers an API and client side contains more business logic.
The basic idea is to have a HTML file, with some CSS and JS code responsible to load or send data from/to server and update the UI.
This is different from the "traditional" model whre client request a server page. The server proces the request, generates a HTML (plus CSS+ JS) and returns to client. Then any click on a button generates a new request that returns a new page. etc.
I suggest you to take a look to Dojo toolkit.
Programming in the gmail way can produce lost of JS files and really big HTML files. Dojo simplifies that a lot and also manages modules. This way the client side code is not loaded once when the HTML page is loaded, but it manages which "modules" you need and load it when needed.
Hope this can clarify a bit.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I need to build a sitemap for my website.
The url will be "www.example.com/mysitemap.html".
I know that there are some tools that generate automatically an XML file that contains the
reachable URLs and also improve the SEO.
So my questions are:
How can I build this HTML page going from the generated XML? Or am I wrong and this kind of HTML page is built manually? If not, how do we integrate the XML and convert it to the website?
Thank you very much.
Regards.
If your site architecture is contained in a database (like a CMS) you can do something like Darkyo suggested.
However there are easier methods. There are many free services which crawl your site and create a sitemap
http://www.xml-sitemaps.com/ or http://sitemapdoc.com/ are some examples but the Internet is full of them. Just google "sitemap creator".
If you want to create your own script there is program called "php sitemap ng" at http://enarion.net/google/phpsitemapng . This can be a real good starting place.
If you run a content based site (like YouTube for example), just write a small script that reads your database and generates an XML file for each URL.
Put it as a cron job once every day/week. You can also ping Google/Yahoo/MSN etc. when your sitemap gets updated so they can pick your new sitemap and index the new URL's.
It really depends of how is programmatically build your website,
if your website is huge and reflects a db schema, the best thing
is to write a friendly url generator and store it to the db.
Thank to this system you'll be able to manage retrieve your sitemap easilly
Select CONCAT("http://mysite.com/article/",article.friendly_url) from article
But as I said it highly depends of your architecture / programming ....
Automatically is very hard. You can help though, by using correct semantics.
This will make Google pick up your site's structure better.
When your website consist of static pages you can create a sitemap yourself. If though it is generated with a database you can do this programmaticly. This won't be easy though if you have no experience.
If you use a CMS like Wordpress or Drupal or ... you probably can generate it with a plugin. Use Google for that!