This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235874 - Browser doesn't refresh on save.
Summary: Browser doesn't refresh on save.
Status: RESOLVED WONTFIX
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-12 12:03 UTC by talofo
Modified: 2016-08-12 06:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Project sample to be setup (6.29 MB, application/zip)
2013-09-12 13:34 UTC, talofo
Details
Video record showing the issue (1.10 MB, video/x-m4v)
2013-09-12 14:19 UTC, talofo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description talofo 2013-09-12 12:03:13 UTC
On new Netbeans 4 beta, the PHP version with HTML5 support, it is important to notice that, when we change something on the code, some html or css property, we do expect the changes to immediately appear on the embedded browser. However that's not the case, regardless the fact that we have checked "reload browser on save" under project properties browser tab.

If you need more details, just let me know. If I can provide them, I will obviously. Np.


K. Regards,
Mem
Comment 1 Vladimir Riha 2013-09-12 12:07:26 UTC
Could you please attach sample project (or send it privately over email) where it doesn't work? Also please specify which browser do you use and attach IDE log [1] after some save where no refresh happened. Thank you


[1] http://wiki.netbeans.org/FaqLogMessagesFile
Comment 2 Tomas Mysik 2013-09-12 12:54:13 UTC
Also, there were some fixes since Beta release; could you please try the development version [1]?

Thanks.
[1] http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 3 talofo 2013-09-12 13:34:41 UTC
Created attachment 139990 [details]
Project sample to be setup

In order to reproduce it we should:

1) Setup the project by pointing the document root to public_html/index.php file. 
2) Trying to access locally on the embedded browser: http://kickoff.dev or whatever was setup.
3) Navigate into project tab and open: public_html/css/main.css 
4) Change something on that css file, for example, font size on body.
5) The changes will **NOT** appear on the embedded webkit browser. Only upon refresh.

Can't find the log file on the path described on the webpage.

The same happen on the latest build. (just tested).
Comment 4 Vladimir Riha 2013-09-12 13:45:11 UTC
Thanks a lot for the project, it works for me though. I only modified index.php:14

elseif ($_SERVER['HTTP_HOST'] == 'localhost') 

and ran the php project on url

http://localhost/kickoff.dev/public_html/index.php

After modifying css file, changes are visible in browser without even saving the css file (as designed)



Product Version: NetBeans IDE 7.4 RC1 (Build 201309112301)
Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 5 talofo 2013-09-12 13:57:39 UTC
(In reply to Vladimir Riha from comment #4)
> Thanks a lot for the project, it works for me though. I only modified
> index.php:14
> 
> elseif ($_SERVER['HTTP_HOST'] == 'localhost') 
> 
> and ran the php project on url
> 
> http://localhost/kickoff.dev/public_html/index.php
> 
> After modifying css file, changes are visible in browser without even saving
> the css file (as designed)
> 
> 
> 
> Product Version: NetBeans IDE 7.4 RC1 (Build 201309112301)
> Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b56
> Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
> System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)


Latest Java;
Latest Netbeans

But, I'm on:
Mac OS X 10.7.5

And, if it matters, I've setup virtual hosts.

I've checked again, and the same issue happens.

I can provide the log, if anyone could tell me where to find it.
I can go to:  /Users/MYUSERNAME/Library/Application Support/ but, once there, I can't find any Netbeans folder there.
Comment 6 talofo 2013-09-12 14:05:37 UTC
Additional Details:

Product Version: NetBeans IDE Dev (Build 201309120002)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Mac OS X version 10.7.5 running on x86_64; UTF-8; en_US (nb)
Comment 7 talofo 2013-09-12 14:19:14 UTC
Created attachment 139995 [details]
Video record showing the issue

Here's a video on the issue, where I try to change some values, and see them on the browser.
Comment 8 Vladimir Riha 2013-09-13 08:09:22 UTC
Ha, virtual host is the problem here. I have set up it the same way as you and CSS files used in the web page are not "mapped" to actual local files, for instead selecting  div#page.container in browser DOM shows that CSS properties/rules come from file 

http://kickoff.dev/css/main.css

and if you double click on some CSS property/rule in CSS Styles, it opens CSS from URL above as read-only remote file.

To be honest, I'm not sure how/if this should work as you can set up virtual hosts to anything and IDE imho cannot say for sure "this URL matches this local file"
Comment 9 talofo 2013-09-13 08:48:03 UTC
Thanks for spotting that out. 

I'm not sure if virtual host is the problem. I believe the problem lies somewhere else, somehow related with the virtual host configuration, but definitely, virtual host seems not to be the problem nor it should be, because that checkbox option and the browser refresh should work, regardless of any virtual host configuration one may have.

If you check out the video taken, you will notice that, when we click on "refresh" embedded IDE browser button, the browser viewport rendered page, gets properly updated. 
As far as I can see, he knows that "this URL matches this local file" on that case, so it should just do the same without making that click.

Hope to have your consideration towards this.
Comment 10 Vladimir Riha 2013-09-13 08:54:00 UTC
Well browser does not really care about local->"remote" file relation as it takes what it receives from server, right? The problem is that IDE needs to know this relation to be able to get "dependencies" (files used by currently loaded page) and listen on modifications of their local equivalents in IDE and e.g. refresh browser upon save.

I think this is not happening, so e.g. http://kickoff.dev/css/main.css is not mapped to main.css in the project.
Comment 11 talofo 2013-09-13 18:37:55 UTC
Hello Vladimir, sorry for the late reply.

I'm not even close to understand netbeans "inner guts" but I believe you may be right.

So, regarding this bug issue report, should I do something else? Can you or anyone else check if this is something easily fixable for the next release?

Thanks again.
Comment 12 Tomas Mysik 2016-08-12 06:09:51 UTC
Is this issue still relevant? If it is, please reopen it.

Thanks.