• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why is Refresh neccessary when loading the page?

 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!


I'm creating a server.
When I want to reach new page I get the proper content in the browser, BUT in text format. I'm using OutputStream's methods write, flush, close...
After that, when I click F5 (Refresh), page loads properly.

Any (theoretical) ideas?


Regards
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65128
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you setting the no-cache headers as described in the FAQ?
 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is what i have:



Any idea (what's missing)?

I'm looking after explanation on the web for no-cache headers that you mentioned, Bear:
http://faq.javaranch.com/java/NoCacheHeaders


Regards
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65128
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's them!
 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me know if you already know what's wrong and how/where should I make corrections, please?


Regards
 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the response header:




Still no luck -TEXT format is loaded on the first attempt...


Regards
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65128
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"-TEXT format"?
 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the real page, because HTML content is displayed as:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"><head>............

(problem from the begining)


Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic