All Questions
828
questions
23
votes
9
answers
69k
views
Prevent PHP code from executing if form was not submitted [duplicate]
I have a php file say "check.php" in my website and it is executed when a form is submitted.
say my website is "myweb.com" and the php file is in a directory "PHP"
I want to prevent direct url ...
17
votes
9
answers
8k
views
Why is server ignoring changes in the code files even though cache is disabled?
I test an html/js code on my localhost (Windows 7, Chrome v79.0.3945.130 (64-bit)) and about 50% of the time code changes are not reflected in the browser (I see it with Dev Tools/Sources).
There are ...
16
votes
3
answers
9k
views
Difference between Localhost and opening html file
What is the fundamental difference running a file using a server in localhost, and opening a file such as file:///Users/$user_name/$your_directory/index.html, assuming no backend is used, and it is ...
14
votes
8
answers
20k
views
Why is my favicon not working on server but is working locally?
New to web dev. I have a favicon that works locally but doesn't want to behave on server. The following is my favicon tag in the head tag:
<link rel="icon" type="image/png" href="../favicon/...
11
votes
3
answers
78k
views
flask - Display database from python to html
I have code like this to retrieve data from database and I want to display it in html.
This is app.py
@app.route('/news')
def news():
import pymysql
import re
host='localhost'
user =...
8
votes
2
answers
26k
views
How to force user to refresh cache
So I'm trying to update my site's pdf forms, but when I changed them in my server, my users only see the old forms.
Is there a way to automatically force them to refresh the cache so they will see ...
7
votes
3
answers
6k
views
using SSE to send image data
All examples that I have seen that implement server sent events (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) set content type of the response to text/...
7
votes
1
answer
4k
views
How do I host an mhtml file on a webserver?
I want to just be able to get people to go a link to an mhtml file hosted on a server and be able to see the fully formatted webpage that you'll see when you save the file and open it in Google Chrome ...
6
votes
1
answer
12k
views
Host a local html file in localhost using python alone
I am running a code on a remote server that periodically generates a "status" html(something like a tensorboard say) and stores it in a folder in the server. Currently I download the html ...
6
votes
2
answers
19k
views
How to see whether a website is client side rendered or server side rendered?
So, SSR means that the server sends a fully packed html, css and js file while CSR only sends the empty html and again client fetches the js to populate the data on the page.
I want to visualize this....
6
votes
3
answers
2k
views
How does browser decide when to request a cached file again?
I have a webpage that I am caching for 12 hours. These are two screenshots of the response headers.
and
As you can see both the 'Date' and 'Expires' header have changed in values. My understanding ...
6
votes
3
answers
3k
views
npm http-server downloads index.html instead of serving
I am using http-server with ssl certificate in order to test facebook instant games. However, while server is running localhost makes my browser download index.html file instead of actually serving it ...
5
votes
1
answer
9k
views
WebStorm built-in web server gets 404 for every css and js file included in index.html
Here is my index.html for posterity's sake:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<...
4
votes
3
answers
6k
views
How to get location of server based on IP address in Python [closed]
Can we program (probably in python) to get the server location from where we are accessing the webpage.
P.S. Its just for fun and to get in-depth knowledge.
4
votes
2
answers
11k
views
Serving HTML file from Node server
Pretty much purely for pedagogical purposes, I'm serving both my front and back end data out of my one node server. Right now, I'm at the point where I've received my client request successfully, ...
4
votes
4
answers
8k
views
javascript not loading in HTML file - nodejs + http
Disclaimer: I am new to node.js so I assume there is a very basic answer to this question.
I am using node.js on Windows, with http module to generate a static page with content generate from a js ...
4
votes
2
answers
15k
views
How to set up a GET-Response in Groovy using HTTPBuilder
I have several issues stored in my YouTrack Server and I would like to extract those issues and pack the information in Strings.
I already worked with the RESTClient, however I got bad output and ...
4
votes
3
answers
7k
views
Nameservers vs URL Forwarding
I have a domain name that I got from a domain name register. I think I understand that "url forwarding" means whenever someone types in the domain name I own, they are redirected to a different URL. ...
4
votes
3
answers
2k
views
How to pass rendered plot to a html file through render_template?
I am following this answer, and I want to use render_template to call my html file instead of running plot in my py directly.
I want to use something like:
return render_template('hello.html', ...
4
votes
0
answers
969
views
How do I prevent loading the same image multiple times when generating elements?
I have a script that generates product "cards" on my website. These product cards contain images of the products. When they initially load, they have tiny-sized placeholder images to indicate that the ...
4
votes
0
answers
155
views
Stream web page from server to youtube live
I'm trying to find a package for Linux servers or an online service to stream a webpage with live content directly to Youtube Live.
It's pretty much like a screen cast made from your computer to ...
4
votes
0
answers
216
views
Trying to run a HTML application but server could not find right bundle
I tried to run a HTML file that I coded on netbeans in eclipse. I downloaded the web tools platform in the eclipse marketplace. Then I configured the server but when I tried to run the file, I got a ...
3
votes
1
answer
4k
views
Node chat gives throw er; //unhandled error event
So i set up a small basic chat system:
Server code:
var io = require('socket.io').listen(8000);
// open the socket connection
io.sockets.on('connection', function (socket) {
// listen for ...
3
votes
2
answers
6k
views
Upload HTML form data file to server using CGI in C?
I have a HTML form put in a CGI file in C with fprintf statements like this:
<form action="cgi-bin/upload.cgi" method="post" enctype="multipart/form-data">
<p>Photo to Upload: <...
3
votes
1
answer
4k
views
What is the file extension .bhtml and why use it?
Today I ran across a site that uses .bhtml as their served file extension. Is this just some proprietary internal php file? Is this used for SEO purposes? Why would anyone use it? Only thing on the ...
3
votes
1
answer
2k
views
Host reveal.js slides (.html) [Jupyter notebook export] as webpage on non local server
I am currently working on a Jupyter Notebook.
I managed to export it as reveal.js slides (.html) and host it on my local server. I used the following command line in the terminal:
jupyter nbconvert &...
3
votes
1
answer
10k
views
How do I create a new .html webpage onclick? [closed]
What I want to do is when the user clicks my html button I want to dynamically create a new webpage on the server. I need the url of the new webpage to have it's own url, that is, it should be ...
3
votes
2
answers
5k
views
Markdown - Link to file in subfolder
My markdown "site" is in folder: b-vis
In this file I want to link my JavaDov which is as "index.html" in the subfolder "b-vis/doc-com/index.html"
I tried the following:
[This link](/b-vis/doc-com/...
3
votes
4
answers
604
views
Download and view a prototype on iPad without internet
Does anybody know of a way to download a prototype (in this case Zurb Foundation) and run it on an iPad without an internet connection?
This is needed for a demonstration where we cannot rely on ...
3
votes
4
answers
17k
views
What are possible reasons that HTML download link is failing?
I created a page for users to download certain files. I used the HTML download link to do this as so:
<a download href="/home/Uploads/someDir/someFile.PNG" >View</a>
This worked fine ...
3
votes
1
answer
1k
views
Python file opens up in browser window instead of download prompt
I am trying to make files downloadable from my website, but when I test it by clicking on the download file, it opens up the code in a webpage, instead of downloading it. I'm using Firefox, by the way....
3
votes
1
answer
3k
views
Font-face working on local but not on server
like the title say font-face is not working on internet but it's working on local, I don't understand why. Can someone help me ?
Here's my code:
@font-face {
font-family: 'ocraextended';
src: ...
3
votes
2
answers
15k
views
Why DirectoryIndex index.php index.html is not working?
I currently use ipage as a host and have a domain pointing to an index.html. However, I need the domain to point to an index.php instead. So I created a .htaccess and only wrote; DirectoryIndex index....
3
votes
1
answer
3k
views
How to render pages without .html extension as html pages in Apache server
I made a webpage that should load a html files into a iframe. When you click something, it appears in . Although all of my files are html documents with html tags, they don't have extensions. So in ...
3
votes
2
answers
2k
views
What are randomly generated class names called?
Something I see a lot of sites doing is making class names seem random. I'm sure they're not really random in the backend, but looking at the names of classes in the front end, it would appear that ...
3
votes
1
answer
2k
views
Send commands to a remote ssh server from my website form
I want to create a website that users can fill a form,
and then I send those parameters to a remote ssh server to issue a python script.
Example, in my webpage, the form contains input text, para1, ...
3
votes
1
answer
3k
views
How to link local files through html
I need to link from local server to multiple computers. It works if I save the page locally on each machine but does not when launched from the web server.
I've looked around and read that Chrome or ...
3
votes
1
answer
6k
views
Send data from SIM800 to a server
Can somebody help me?
I have problems sending data from a SIM800C to a website.
The first problem is, I uploaded the following code to Arduino (I use the Serial Monitor in Arduino IDE to send AT ...
3
votes
1
answer
337
views
Configuring php/MVC on server
I have a created a project in HTML/PHP and I am trying to upload everything to the server. I am not that familiar with servers other than the fact that your first page must be an index.php/htm file ...
3
votes
4
answers
45k
views
Server: [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.service Error processing request java.lang.NullPointerException
My tomcat server always throws the following errors (Linux, Tomcat version is 8.5.4, using tail -f catalina.out):
The first error:
17-Jan-2017 10:39:24.982 SEVERE [http-nio-8080-exec-7] org.apache....
3
votes
0
answers
223
views
How do I get my server(AWS EC2) to send a .html file as an html in C#?
I have a server set up using Amazon Web Service's EC2 virtual machine.
My server application I have written in C#.
Currently, my game, written in JavaScript, can send data to the server and receive ...
3
votes
1
answer
6k
views
How can I dynamically generate Html content with Node.js? [duplicate]
I understand how I can serve Html pages through Node.js to a client. Now I'm looking for a way to programatically generate Html on the server side (and then do whatever I want with it: save to a file, ...
2
votes
4
answers
3k
views
How can generate a Local Server in Ruby
I want to generate ( i dont like create word) a local server (like localhost/8000) on my LAN by Ruby, i researched İnternet but i cant make it.
My aim is showing html pages in local servers , using by ...
2
votes
2
answers
18k
views
Access htaccess of another website
How do I download an htaccess file from another website?
How do I view my own htaccess in my browser?
I have tried to go to www.website.com/.htaccess but no success for example.
I know that there ...
2
votes
3
answers
13k
views
jinja2.exceptions.TemplateNotFound: index.html
I try to open a index.html using Flask
run.py
from app import app
app.run(debug = True)
__init__.py
from flask import Flask
app = Flask(__name__)
from app import routes
routes.py
from flask ...
2
votes
2
answers
61
views
Where does POST request go?
I am trying to understand the following line from a website source code:
$.post("/cp/gallery_items/upload_handler/", { file_name: file.name, file_size: file.size, in_element_id: "20144" } , function(...
2
votes
2
answers
820
views
Config nginx for many client projects
We have about 30+ client projects(some are vue projects and other are static html projects), each projects have seperate root directory.
For now nginx is config like, each project has a location.
...
2
votes
2
answers
4k
views
How to run "index.html" in React
I am testing the build file by putting it on the server.
But, if I type index.html directly at the end of the URL, I get a gray screen. What is the reason?
[Example]
baseURL/ -> working
baseURL/...
2
votes
1
answer
4k
views
fetching the page failed because it's denied by robots.txt
I'm trying to validate my page with twitter tags in twitter card validator. But all times i get error: "ERROR: Fetching the page failed because it's denied by robots.txt."
If i try to watch on my ...
2
votes
1
answer
2k
views
Link index.html client.js and server.js
I'm starting with Node.js and I have already a problem in my first program. Below is the code I'm using. Index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
...