1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

304 Not Modified HTTP Question

Discussion in 'Site & Server Administration' started by T0PS3O, Aug 19, 2004.

  1. #1
    This is what webalizer tells me on a certain site:

    Code 200 - OK 1936
    Code 206 - Partial Content 126
    Code 302 - Found 1
    Code 304 - Not Modified 644
    Code 404 - Not Found 52

    Now, looking around the world with Google trying to find out what 304 really is gives me a whole load of tech talk which doesn't mean anything to me. So I ask fellow DPers to please shed some light on this.

    W3 mentions:

    Does this mean it has something to do with a form on our site?

    Why is this error triggered and how can I prevent it? I've never noticed anything out of the ordinary, can it be this arises just in certain browsers?

    On 204.

    Webalizer says it is Partial Content, yet W3 says No Content.

    What does this error mean? What is a likely cause?

    Thanks for the heads up again!
     
    T0PS3O, Aug 19, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    It's not an error... it just means the document has not modified since the last time the user requested it.

    Thank god for the 304 too, because otherwise you would have to download every image every time when browsing around a site. The 304 makes it so image files (and static html in some cases) can be pulled from the user's cache if the file has not changed.
     
    digitalpoint, Aug 19, 2004 IP
  3. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Right! So it is a returning user (probably myself) pulling data from the cache.

    So what is 204 then?

    404 is the only one to worry about then I reckon.

    Thanks!
     
    T0PS3O, Aug 19, 2004 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    204 is sort of like a 404... pretty rare though, because I think you have to specifically set it up. Basically means there is something there, but there is no content yet.

    You can check all the HTTP status codes (notice they are not necessarily error codes) here:

    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
     
    digitalpoint, Aug 19, 2004 IP
  5. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes I read that but it is more server admin orientated than webmaster point of view hence me understanding little about it.

    Anyway I know enough to worry less so I'm cool with the answers you gave me.

    I would give you a thumbs up if I hadn't sprained/torn some ligaments in my thumb trying the TS FS 360 (you ride the water too don't you?) stacking it and having my thumb caught in the handle.

    Anyway, thanks!
     
    T0PS3O, Aug 19, 2004 IP
  6. Owlcroft

    Owlcroft Peon

    Messages:
    645
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Notice the magic word in "a conditional GET request"--_conditional_. It signifies that the client was asking the server whether the resource had been modified; if it gets a 304, it knows it doesn't need to re-download it (that kind of request is issued when the client knows it has a cached copy). If it had been modified, the client would follow up with a standard (unconditional) GET.
     
    Owlcroft, Aug 19, 2004 IP
  7. martnkrp1

    martnkrp1 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hello!

    I am new here. :)

    Can somebody tell me, what is wrong, that my server doesn't send class files to the client, which is on the LAN (I have only two computers, linked with crossover cable)
    One computer is HTTP server and on another I try to access a home page with some java .class file (on the HTTP server).
    html code displays correctly, but the class files (applet) doesn't show at all!

    In the status bar it says:
    load: class TalkClientApplet not found

    And if I open the java console, I see this error:
    Error loading class: TalkClientApplet
    java.lang.NoClassDefFoundError
    java.lang.ClassNotFoundException: TalkClientApplet
    at com/ms/vm/loader/URLClassLoader.loadClass
    at com/ms/vm/loader/URLClassLoader.loadClass
    at com/ms/applet/AppletPanel.securedClassLoad
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run


    But when I look in the HTTP server log file, I see error code 304 after the GET command for class files.
    I understand, that this is not an error, so the client should load the class file from cache? But it doesn't do nothing...it doesn't find it. (look errors above)

    Can you help me, what is wrong?

    But I think, this works perfectly over the Internet! (some friends told me, that it works for them, when they access my web page, they can normally see the applet)

    Thanks for your help.

    Regards,
    Martin
     
    martnkrp1, Sep 4, 2004 IP
  8. martnkrp1

    martnkrp1 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I found out, what was the problem.
    It was Java, which was original with windows XP, not Sun.
    When I installed Sun JRE, it works fine. :D
     
    martnkrp1, Sep 5, 2004 IP