Issue
I have a piece of code I am using for testing on http servers
. What I did first was to set up my http server in python and type it in my web browser, listening on port
8000. However when i delete the
index.htmland stopped the
python` script and hit refresh on my webbrowser, it still shows the same page! I am currently using Firefox developer edition by the way.
I have tried replacing the index.html
with another different website index.html
for testing, but it wasnt showing the new website.
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print("serving at port", PORT)
httpd.serve_forever()
I expect the web browser to stop showing index.html
after closing the python
script. Please help to fix my code so that it stops showing the same index.html
Solution
Your issue is with the caching! Try hitting ctrl+f5
in your browser to see if it works.
A bigger list of no-cache-reload keyboard shortcuts for various browsers can be found here:
https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Bypassing_cache
Answered By - Axois
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.